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內容進行更新。請問我錯過了什麼?任何幫助,將不勝感激。