问题描述
我对 Grunt JS 和 SASS 相当陌生。我已经设法设置 Grunt JS 来查看我的 SCSS 文件并将其编译为我的 CSS 文件。
我目前正在使用 Dreamweaver 并使用我的快捷方式 (CTRL + SHIFT + U) 上传 SCSS 文件。当我这样做时,我看到 Grunt 观察文件并修改 CSS 文件。
这是我看到的:
C:\Users\Path to project\project\wp-content\themes\my-listing-child>grunt watch
Running "watch" task
Waiting...
>> File "scss\style.scss" changed.
Running "sass:dist" (sass) task
编译过程工作正常,除了我必须分别上传 SCSS 和 CSS 文件才能在实时网站上查看更改。
我的问题是,如何同时上传这两个文件?我不确定这是否是一般 Dreamweaver 问题的 Grunt 问题?
如果有帮助,这就是我在 gruntfile.js 中的内容:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),sass: {
dist: {
files: {
'style.css' : 'scss/style.scss'
}
}
},watch: {
css: {
files: '**/*.scss',tasks: ['sass']
}
}
});
grunt.loadNpmtasks('grunt-contrib-sass');
grunt.loadNpmtasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)