I'm banging my head with what should be a simple fix to a gulpfile that would allow it to build scss files.
I have the following structure in my angular2 project: |-rootDir |-- app |--- <bunch of stuff in the app dir> |-- resources |--- scss |---- <scss files>
However, whenever I run gulp createI get an error stating Error: Invalid glob argument: undefined
What am I doing wrong here???
This is my gulpfile:
var gulp = require('gulp'), sass = require('gulp-sass'), minifycss = require('gulp-minify-css'), autoprefixer = require('gulp-autoprefixer'), concat = require('gulp-concat'), debug = require('gulp-debug'), del = require('del'), insert = require('gulp-insert'), fs = require("fs"); /* Tasks Functions */ sass = function(files, dest) { pipe_files = gulp.src(files); return pipe_files .pipe(debug()) .pipe(sass().on('error', sass.logError)) .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4')) .pipe(minifycss()) .pipe(gulp.dest(dest)); } /* CSS Tasks */ gulp.task( 'styles', function() { sass( ['./resources/scss/*.scss'], './resources/css_gulp/') }); gulp.task('clean', function(cb) { del(['./resources/css_gulp/*.*'], cb) }); gulp.task( 'create', function() { gulp.start('styles'); }); gulp.task('default', ['clean'], function() { gulp.start('create'); }); So, where am I going wrong on the paths?
* EDIT * I've added gulp-debug and this is the output: [20:03:40] Finished 'create' after 17 ms [20:03:40] gulp-debug: resources/scss/main.scss [20:03:40] gulp-debug: resources/scss/prime-overrides.scss [20:03:40] gulp-debug: 2 items
Everything seems correct here. So why the error?
includePathsthat is the array of paths.sass.