javascript - Gulp - Excluding Paths dont work for me -


i saw lot of google entries question "how exclude in gulp paths" none of work me.

the thing works this:

gulp.task('sassplatform', function () {     return gulp.src([         './src/sass/platforms/**',         // todo find way make shorter         '!./src/sass/platforms/globals/*.scss',         '!./src/sass/platforms/globals/'     ])         .pipe(sass({outputstyle: 'compressed'}).on('error', sass.logerror))         .pipe(gulp.dest('./dist/css/platforms')); }); 

the point got folder structure:

scss   |_platforms     |_globals       |_content.scss       |_footer.scss       |_globals.scss       |_header.scss     |_superfolder1       |_main.scss     |_superfolder2       |_main.scss     |_superfolder3       |_main.scss     |_and alot of superfolders more... 

i want keep folder structure , take fields in superfolders. not global folder.

with code works correctly. want understand why doesn't work with:

'!./src/sass/platforms/globals{/, *, *.scss}' 

glup uses internally node-glob expandas section in curly brackets before matching patterns writting:

'!./src/sass/platforms/globals{/, *, *.scss}' 

gets expanded into:

'!./src/sass/platforms/globals/' '!./src/sass/platforms/globals*' '!./src/sass/platforms/globals*.scss' 

and not want. try using instead:

'!./src/sass/platforms/globals/{*, *.scss}' 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -