Grunt に少し問題があります。Sass/SCSS ファイル (私が使用している .scss) をコンパイルしていますが、LiveReload しません。LiveReload 機能を統合する「watch」依存関係を使用しています。
見る: 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}'
]
}
}
});