gulp-sass

Gulp-sass not compiling Foundation 6 properly

巧了我就是萌 提交于 2019-12-23 07:37:06
问题 I'm having some issues with Foundation 6 files, for some reasons they are just not including all of the sass components. I tried to use Foundation 5 and it worked fine. Here is my gulp task: gulp.task('styles', ['clearCss'], function() { gulp.src('assets/sass/app.scss') .pipe(plumber(plumberErrorHandler)) .pipe(sourcemaps.init()) .pipe(sass({ outputStyle: 'compressed' }) .on('error', notify.onError(function(error) { return "Error: " + error.message; })) ) .pipe(autoprefixer({ browsers: ['last

Using gulp-sass, how do I preserve the folder structure of my sass files except for the immediate parent directory?

佐手、 提交于 2019-12-23 01:11:32
问题 I have a project with multiple folders that contain sass files: |── src └── scripts └── app1 └── sass └── base.scss └── app2 └── sass └── base.scss I also have a gulp task that compiles those .scss files using gulp-sass and gulp-concat-css : gulp.task('build:sass', () => gulp.src([ 'scripts/**/*.scss' ]) .pipe(plugins.sass().on('error', plugins.sass.logError)) .pipe(plugins.concatCss('bundle.css')) .pipe(gulp.dest('dist')) ); Right now, the above task just creates bundle.css into the dist

gulp-ruby-sass unable to import files

孤者浪人 提交于 2019-12-22 09:28:42
问题 I am trying to create a gulp-ruby-sass task however i am seeing the following error: [17:32:34] gulp-ruby-sass: error ./styles.scss (Line 1: File to import not found or unreadable: header.scss. Load path: C:/Users/nassi/AppData/Local/Temp/gulp-ruby-sass) My project structure: app assets css _header.scss _home.scss _navigation.scss _buttons.scss _dialogs.scss styles.scss Within styles.scss i have: @import "header.scss"; @import "home.scss"; @import "navigation.scss"; @import "buttons.scss";

gulp-sass compiles Google Fonts CSS into the file, breaks protocol-relative link

有些话、适合烂在心里 提交于 2019-12-21 16:53:11
问题 When I use the following code in my .scss file @import url('//fonts.googleapis.com/css?family=SomeFont:400,700,400italic'); the SASS parser I use (nodejs gulp-sass ) happily downloads the file from said location and includes it as plain text in the compiled output. Here's my Gulpfile: var gulp = require('gulp'), sourcemaps = require('gulp-sourcemaps'), autoprefixer = require('gulp-autoprefixer'), minify = require('gulp-minify-css'), rename = require('gulp-rename'), sass = require('gulp-sass')

Can I install just Gulp globally?

限于喜欢 提交于 2019-12-21 07:03:31
问题 I'm constantly working on new web development projects that don't ever, in practice, need their node_modules folder when deploying. It would suit me much more if I was just able to create a small gulpfile.js for each project, rather than 6000+ files contained in the node_modules folder for every project, that are only ever used by me on this machine. I only use Gulp to compile SASS and prefix and minify my CSS. I don't need to worry about any other type of deployment issues, but the

gulp-sass work around for load_path support?

烂漫一生 提交于 2019-12-21 04:11:36
问题 Problem: I'm using gulp-sass and would like to define a load_path so that I don't have to have really long @import rules voor bower dependencies e.g. @import "normalize" instead of @import "../../../../../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/normalize" What is the best way to i achieve this when using gulp-sass which uses the LibSass engine to process sass files? 回答1: After struggling with this myself I found a option in gulp-sass : sass({ includePaths: ['./bower

Gulp.js event stream merge order

不羁的心 提交于 2019-12-20 08:35:16
问题 I am trying to merge css and scss files into a main.css file that goes in my build directory. Its working, but not in the right order. The style attributes from the scss files need to be in the bottom of the main.css file so they overrule the rest. my Gulp task looks like this: //CSS gulp.task('css', function () { var cssTomincss = gulp.src(['dev/css/reset.css', 'dev/css/style.css','dev/css/typography.css', 'dev/css/sizes.css']); var cssFromscss = gulp.src(['dev/css/*.scss']) .pipe(sass());

Combine all sass files into a single file

南楼画角 提交于 2019-12-19 12:52:47
问题 Is there any option available in gulp-sass to combine sass files? For example: main.scss: $var: red; control.scss: @import 'main'; .a{ color: $var; } The combined output file should be single scss file like below $var: red; .a{ color: $var; } 回答1: Did you try something like this? gulp = require('gulp'); concat = require('gulp-concat'); // the default task gulp.task('default', function() { return gulp.src('./*.scss') .pipe(concat('all.scss')) .pipe(gulp.dest('./dist/')); }); This should

Run gulp task after NPM package install

北城以北 提交于 2019-12-13 17:18:44
问题 I've developed a small package that I'm serving from a github repo. It's basically a UI Library and it has only a SCSS file. my-ui-library -- src/styles.scss I would like that after the installation the package run itself a gulp task that compiles the CSS, and move it to other location. The desired output, after the gulp task is run, is something like this: my-ui-library -- src/styles.scss -- styles.scss I've included some scripts "scripts": { "postinstall": "gulp" } I can´t find the way to

Run gulp watch command forever

走远了吗. 提交于 2019-12-12 01:27:19
问题 gulp.task('css', function () { gulp.src('custom_css/sass/style.scss') .pipe(sass({ style: 'compressed' })) .pipe(gulp.dest('./public/css/')); }); gulp.task('watch', function() { gulp.watch('custom_css/sass/style.scss', ['css']); }); gulp.task('default', ['css','watch']); this is my gulp script code. when I run gulp in the terminal it start watching for changes, auto compile sass file, but it stop watching if I closed the terminal window. I have also used gulp & to run it in background but not