gulp-sass

Gulpjs combine two tasks into a single task

前提是你 提交于 2019-11-28 17:19:56
问题 I currently have two tasks, that both compile sass files. I would still like to concat the two directories into separate files but it seems that it would be more maintainable if I could simply create a 'sass' task that would be responsible for all of the sass compilation. // Compile Our Sass gulp.task('bootstrap-sass', function() { return gulp.src('./public/bower/bootstrap-sass/lib/*.scss') .pipe(sass()) .pipe(contact('bootstrap.css')) .pipe(gulp.dest('./public/dist/css')); }); gulp.task(

node sass release 3.5.3 is breaking build

自作多情 提交于 2019-11-28 08:43:45
问题 This is also currently biting my project, which uses gulp-sass. gulp-sass depends on node-sass#^3.4.1 which just automatically updated to 3.5.3 which is a breaking release. I have degraded my gulp sass version to the older(2.1.0) by updating the package.json file but its still breaking. how to go back to node sass 3.4.2? Error Message Error: You may not @extend an outer selector from within @media. You may only @extend selectors within the same directive. { "version": "1.0.0", "name": "abcd",

Underscore in partial Sass file

孤街醉人 提交于 2019-11-28 07:11:32
Is it necessary to have a .scss partial file start with an underscore? The documentation states that a partial should start with an underscore, because the file would otherwise compile to a CSS file. However I've noticed gulp-sass compiles files without an underscore into one complete CSS file just fine. 1. Partials must start with an underscore if you do not want them to be generated into a css file. 2. A scss file can import another file without an underscore and still compile correctly. Take this example: sass +-- base | +-- _normalize.scss +-- components | +-- site-header.scss +--

Gulp Sass with errLogToConsole: true still stopping my other watch tasks

ⅰ亾dé卋堺 提交于 2019-11-28 05:33:41
问题 I currently have 3 watch tasks as so: gulp.task('watch', function(){ gulp.watch(sassDir + '/*.scss', ['sass']); gulp.watch(cssDir + '/*.css', ['css']); gulp.watch(jsDir + '/*.js', ['js']); }) My issue right now is that when Sass throws an error all watch tasks stops. I then added .pipe(sass({errLogToConsole: true})) - which seems to keep my sass watch task alive even with an error, however the two other watch tasks doesnt seem to run. How do I keep all of my watch tasks a live, so that an

cannot find module “lodash”

巧了我就是萌 提交于 2019-11-28 04:52:26
Today I tried to learn more about Google Web Starter Kit so I followed these instructions and after a lot of fight and problem I just tried to start a local server (the first task we’ll look at is: $ gulp serve .) and received this error: C:\gwsk>gulp serve Error: Cannot find module 'lodash' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\gwsk\node_modules\browser-sync\node_modules\portsc anner-plus\lib\index.js:3:9) at Module._compile (module.js:456

How to compile or convert sass / scss to css with node-sass (no Ruby)?

瘦欲@ 提交于 2019-11-28 02:44:46
I was struggling with setting up libsass as it wasn't as straight-forward as the Ruby based transpiler. Could someone explain how to: install libsass? use it from command line? use it with task runners like gulp and grunt? I have little experience with package managers and even less so with task runners. Thoran I picked node-sass implementer for libsass because it is based on node.js. Installing node-sass (Prerequisite) If you don't have npm, install Node.js first. $ npm install -g node-sass installs node-sass globally -g . This will hopefully install all you need, if not read libsass at the

Node Sass does not yet support your current environment: Linux 64-bit with false

痞子三分冷 提交于 2019-11-27 18:38:46
Getting this error on Arch Linux with node-sass. I'm using it with gulp-sass . Node Sass does not yet support your current environment: Linux 64-bit with false Versions $ gulp -v [19:43:15] CLI version 3.9.1 [19:43:15] Local version 3.9.1 $ npm -v 3.9.0 Node $ node -v v6.2.0 Even using this command npm rebuild node-sass is not changing anything. run npm rebuild node-sass or run sudo npm rebuild node-sass Jorge Torres in some cases you need to uninstall and install node-sass library. Try: npm uninstall --save-dev node-sass and npm install --save-dev node-sass You should also check your version

Task Runner Explorer can't load tasks

雨燕双飞 提交于 2019-11-27 17:07:25
I'm using VS2015 and Gulp. I open the Task Runner Explorer and hit refresh, and this shows up in the log: Failed to run "C:\Projects\Test\Gulpfile.js"... cmd.exe /c gulp --tasks-simple Error: `libsass` bindings not found in C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-ia32-11\binding.node. Try reinstalling `node-sass`? at Object.sass.getBinaryPath (C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\lib\extensions.js:148:11) at Object.<anonymous> (C:\Projects\Test\node_modules\gulp-sass\node_modules\node-sass\lib\index.js:16:36) at Module._compile

Underscore in partial Sass file

谁都会走 提交于 2019-11-27 01:45:38
问题 Is it necessary to have a .scss partial file start with an underscore? The documentation states that a partial should start with an underscore, because the file would otherwise compile to a CSS file. However I've noticed gulp-sass compiles files without an underscore into one complete CSS file just fine. 回答1: 1. Partials must start with an underscore if you do not want them to be generated into a css file. 2. A scss file can import another file without an underscore and still compile

cannot find module “lodash”

自作多情 提交于 2019-11-27 00:41:53
问题 Today I tried to learn more about Google Web Starter Kit so I followed these instructions and after a lot of fight and problem I just tried to start a local server (the first task we’ll look at is: $ gulp serve .) and received this error: C:\gwsk>gulp serve Error: Cannot find module 'lodash' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\gwsk\node