javascript - Compiling SASS files using Grunt creates an unnecessary folder -
so have been trying create first compiled css files using grunt , sass, , having problem cant figure out.
every time run sass task, unnecessary "sass" folder created inside of css folder:
this how looks:
module.exports = function(grunt) { // project configuration. grunt.initconfig({ watch:{ sass:{ files:['sass/*.scss'], task:['sass'] } }, sass: { dist: { files: [{ expand: true, cwd: '', src: ['sass/*.scss'], dest: 'css/', ext: '.css' }] } } }); grunt.loadnpmtasks('grunt-sass'); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.registertask('default', ['sass']);
};
and how folder looks after run task:
/sass/somefile.scss /css/sass/somefile.css
the sass folder should not there, result expect is:
/sass/somefile.scss /css/somefile.css
thanks in advance!
the problem due parameters building files
object dynamically. need set cwd
parameter: "all src
matches relative (but don't include) path."
files: [{ expand: true, cwd: 'sass/', src: '*.scss', dest: 'css/', ext: '.css' }]
Comments
Post a Comment