У меня небольшие проблемы с Grunt, она компилирует мои файлы Sass/SCSS (.scss, которые я использую), но это не будет LiveReload. Я использую зависимость «watch», которая интегрирует функциональность LiveReload.Грунтовка не перезагружается Sass/SCSS (NodeJS)
Часы: https://github.com/gruntjs/grunt-contrib-watch Sass/SCSS: https://github.com/gruntjs/grunt-contrib-sass
Вот мой конфиг ниже (соответствующая часть), может кто-нибудь посоветовать, куда я иду неправильно? Он в реальном времени перезагружается для каждого файла и папки.
grunt.initConfig({
connect: {
options: {
port: 9000,
hostname: 'localhost'
},
livereload: {
options: {
middleware: function (connect) {
return [
mountFolder(connect, 'app'),
lrSnippet
];
}
}
}
},
open: {
server: {
path: 'http://localhost:<%= connect.options.port %>'
}
},
sass: {
app: {
files: {
'./app/css/style.min.css': 'app/css/scss/style.scss'
}
}
},
watch: {
options: {
nospawn: true
},
css: {
files: './app/css/scss/*.scss',
tasks: ['sass'],
options: {
livereload: true,
},
},
livereload: {
options: {
livereload: LIVERELOAD_PORT
},
files: [
'app/{,*/}*.html',
'app/css/{,*/}*.{css,scss,sass}',
'app/js/{,*/}*.js',
'app/img/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
}
}
});