Hi,
I am having a go at SASS and so far I’ve got it to compile a single SCSS file manually using node-sass scss/styles.scss css/styles.css
So now I’m trying to do compile it automatically and lifted the following code off the vs code website, and edited it for my folder paths. The problem I’m having is that I want to change the destination but I don’t know how.
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function() {
gulp.src('scss/*.scss')
.pipe(sass())
.pipe(gulp.dest(function(f) {
return f.base;
}))
});
gulp.task('default', ['sass'], function() {
gulp.watch('scss/*.scss', ['sass']);
})
This is the error I get so i’m pretty sure that it is seeing inside the scss folder at least.
longError
[18:18:38] Using gulpfile c:\Users\markj\Desktop\sass-playlist-master\gulpfile.js
[18:18:38] Starting 'sass'...
[18:18:38] Finished 'sass' after 15 ms
[18:18:38] Starting 'default'...
[18:18:38] Finished 'default' after 17 ms
events.js:160
throw er; // Unhandled 'error' event
^
Error: scss\styles.scss
Error: It's not clear which file to import for '@import "mixins"'.
Candidates:
mixins.scss
mixins.css
Please delete or rename all but one of these files.
on line 3 of scss/styles.scss
>> @import "mixins";
^
at options.error (c:\Users\markj\node_modules\node-sass\lib\index.js:286:26)
I can see where i’m supposed to put the destination as below ( I think!), but I don’t know how to write the syntax. I tried Google but for some reason i’m not asking the right questions today!.
.pipe(gulp.dest(function(f) {
return f.base;
}))
Cheers
Mark