gulp-sass

Pros and cons of node-sass and gulp-sass

瘦欲@ 提交于 2020-01-03 08:24:12
问题 I was wondering what are the differences between node-sass and gulp-sass? What are the pros and cons of each version? I see that on www.npmjs.com node-sass has more than double of an advantage in downloads. Does this make it better? Is there a difference in compiling speed? 回答1: The difference between them is that gulp-sass has node-sass as a dependency :) gulp-sass is a plugin for Gulp - an excellent build tool. And it uses node-sass which it itself is using lib-sass which is a Sass compiler

gulp: How do i pipe a css file in between scss files? gulp.src(['sassfile1.scss', 'cssfile.css' ,'sassfile2.scss'])

做~自己de王妃 提交于 2020-01-03 02:29:33
问题 this is my current code part in gulpfile.js: // Sass gulp.task('sass', function () { gulp.src(['./node_modules/bootstrap/scss/bootstrap.scss', './node_modules/startbootstrap-full-slider/css/full-slider.css' ,'./sass/**/*.scss']) .pipe(sourcemaps.init()) .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 7', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4')) .pipe(sourcemaps.write('./')) .pipe(concat('style.css')) .pipe

Gulp: only compile changed files AND compile parents when imported SCSS file is edited

南楼画角 提交于 2020-01-01 06:56:09
问题 At work we used to use Ruby to compile SCSS. I had the Ruby compiler set up as a file watcher in PhpStorm, and when I edited a partial imported by another file, the CSS file corresponding to the ancestor file was updated without any fuss. I want to get Gulp and Libsass to work the same way. Most solutions I've seen just compile all the SCSS files in a project when a single one changes, but our projects have way too much SCSS for that to be an acceptable solution. gulp-cached seemed like a

Gulp - compile sass by folder, and modify parent directories

瘦欲@ 提交于 2019-12-31 06:58:46
问题 I'm new on gulpfile and i can't figure out how can I iterate through multiple folders using a single task My src folder structure folder1 assets style.scss folder2 assets style.scss folder3 subfolder1 assets style.scss subfolder2 assets style.scss Into dist folder i want something like this ( without 'assets' folder ) folder1 style.css folder2 style.css folder3 subfolder1 style.css subfolder2 style.css I have a few tasks that work properly but I want them to be a single task How can I achieve

Gulp - compile sass by folder, and modify parent directories

[亡魂溺海] 提交于 2019-12-31 06:58:05
问题 I'm new on gulpfile and i can't figure out how can I iterate through multiple folders using a single task My src folder structure folder1 assets style.scss folder2 assets style.scss folder3 subfolder1 assets style.scss subfolder2 assets style.scss Into dist folder i want something like this ( without 'assets' folder ) folder1 style.css folder2 style.css folder3 subfolder1 style.css subfolder2 style.css I have a few tasks that work properly but I want them to be a single task How can I achieve

Gulp-sass : scss file not compiled + variables

我们两清 提交于 2019-12-25 09:45:37
问题 I'm new on using Gulp and gulp-sourcemaps for sass files. I encouter an issue when compiling scss file. So I finally think sourcemaps is the guilt because when I open the last created css.map file, I don't find mention of my last scss file modified and compiled.(but not if I disable sourcemap creation). In addition, path to scss files in firebug isn't the right one.This is my gulp task: var basePaths = { src: './sass/**/*.scss', // fichiers scss à surveiller dest: './css/', // dossier à

Installing gulp-sass throwing error

◇◆丶佛笑我妖孽 提交于 2019-12-25 04:33:39
问题 This question seems to be repeated of this link but I cannot figure out how to map a drive letter or share network. I am really sorry for repeating but I need help. I have a command prompt with default directory pointing to my www folder of wamp server. D:\wamp\www\ I have install other gulp plugin such as gulp-minify. It works fine without any error. But when I try to install gulp-sass it throws error It happens to me most of the time like, I have been trying to install plugin such as

Gulp is not including bower_components's SCSS files in my theme

女生的网名这么多〃 提交于 2019-12-24 20:14:43
问题 I am new to bower and gulp . I am trying to understand how gulp is merging all saas files. This is the code I got from one of the projects. However, running gulp doesn't include any saas files inside bower_components . bower install does generate all files and folder of bower_components . It does generate main.css file. Here is my code: wordpress/wp-content/theme/my-theme/gulpfile.js // ## Globals var argv = require('minimist')(process.argv.slice(2)); var autoprefixer = require('gulp

gulp-sass not showing any errors

ε祈祈猫儿з 提交于 2019-12-24 13:08:05
问题 Sass with .sass files, Here is my gulpfile, var gulp = require('gulp'), sass = require('gulp-sass'), connect = require('gulp-connect'); connect.server({port: 8000, livereload: true}); function exceptionLog (error) { console.log(error.toString()); this.emit('end'); } gulp.task('sass', function () { gulp.src('sass/*.sass') .pipe(sass({ outputStyle: 'expanded', })) .on('error', exceptionLog) .pipe(gulp.dest('css')) .on('error', exceptionLog) .pipe(sass.sync().on('error', sass.logError)); });

Sass import not crawling node_modules to find appropriate package

孤者浪人 提交于 2019-12-24 01:09:39
问题 I am using bootstrap-sass. The node module is installed. I should expect I can, in any .scss file, use the below line to import into an appropriate sheet @import 'bootstrap'; My understanding is what should happen is the compiler crawls up until it finds package.json, hops into node_modules, and finds the appropriate package. Instead I am getting the below error. Error: File to import not found or unreadable: bootstrap If I replace my import with a fully qualified path as below, then