Gruntfile.js
1module.exports = function(grunt) { 2 grunt.loadNpmTasks('grunt-contrib-watch'); 3 grunt.loadNpmTasks('grunt-contrib-compass'); 4 grunt.registerTask("default", ["compass","watch"]); 5 grunt.initConfig({ 6 compass: { 7 dist: { 8 options: { 9 sassDir: 'scss', 10 cssDir: 'css', 11 environment: 'production', 12 }, 13 }, 14 }, 15 watch: { 16 options: { 17 livereload: true, 18 nospawn: false 19 }, 20 scss: { 21 files: ['scss/*.*'], 22 tasks: ['compass'] 23 } 24 } 25 }); 26};
Gruntfile.jsの中身はこんな感じです。
gruntでwatchをすると初回は初回は全体をコンパイルしてくれますが
途中に新規でscssファイルを作成すると新規のファイルは探知してくれません。
watch中に新規でscssファイルを作成してもコンパイル探知してコンパイルするように
したいですがいい方法がありましたら教えてください。
回答1件
あなたの回答
tips
プレビュー