1
请不知道我是否误解了什么咕噜声。我期待写.scss文件和grunt采取我在sass中编写的内容,并将它们更新到我的.css文件中。我学会了配置我的grunfile.js here。但是,在运行grunt watch之后,当我改变它时,grunt会一直观察并执行我的.scss文件。但是,与我的预期相反,它不会更新我的.css文件。下面是我的gruntfile.js使用更新我的css文件使用grunt
module.exports = function(grunt) {
grunt.initConfig ({
sass: {
dist: {
files: {
'public/stylesheets/style.css' : 'sass/style.scss'
},
options: {
loadPath: ['bower_components/foundation-apps/scss']
}
}
},
watch: {
source: {
files: ['**/*.sass','**/*.scss'],
tasks: ['sass'],
options: {
livereload: true, // needed to run LiveReload
}
}
}
});
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass']);
};
在我的页面中,我只引用了style.css,并期望它用我的.scss内容进行更新。请问我错过了什么?任何帮助,将不胜感激。