G2A Many GEOs
SHARE
TWEET

Gulp import partials

Juc1 Jun 8th, 2016 (edited) 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. temple:/data/disk/o1/static/z-themes/csstricks# ls
  2. css/  gulpfile.js  node_modules/  package.json  sass/
  3. temple:/data/disk/o1/static/z-themes/csstricks# ls node_modules
  4. gulp/  gulp-sass/  node-sass-globbing/
  5. temple:/data/disk/o1/static/z-themes/csstricks# cat gulpfile.js
  6. 'use strict';
  7.  
  8. var gulp = require('gulp');
  9. var sass = require('gulp-sass');
  10. var importer = require('node-sass-globbing');
  11.  
  12. gulp.task('sass', function(){
  13.   return gulp.src('sass/**/*.scss') //source = any file with a .scss extension in /sass or a child directory.                                                                          
  14.     .pipe(sass()) // Converts Sass to CSS with gulp-sass
  15.     .pipe(gulp.dest('css')) //destination
  16. });
  17. temple:/data/disk/o1/static/z-themes/csstricks# cat sass/styles.scss
  18. // import sass partials
  19. @import "variables/**/*.scss";
  20. @import "sass/components/test";
  21.  
  22. temple:/data/disk/o1/static/z-themes/csstricks# ls sass/variables
  23. _colors.scss
  24. temple:/data/disk/o1/static/z-themes/csstricks# gulp sass
  25. [09:40:24] Using gulpfile /data/disk/o1/static/z-themes/csstricks/gulpfile.js
  26. [09:40:24] Starting 'sass'...
  27.  
  28. events.js:141
  29.       throw er; // Unhandled 'error' event
  30.       ^
  31. Error: sass/styles.scss
  32. Error: File to import not found or unreadable: variables/**/*.scss
  33.        Parent style sheet: /data/disk/o1/static/z-themes/csstricks/sass/styles.scss
  34.         on line 2 of sass/styles.scss
  35. >> @import "variables/**/*.scss";
  36.    ^
  37.  
  38.     at options.error (/data/disk/o1/static/z-themes/csstricks/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:271:32)
  39. temple:/data/disk/o1/static/z-themes/csstricks#
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top