gulp-sass

gulp autoprefixer giving me a promise error

二次信任 提交于 2019-12-11 03:34:14
问题 I tried this solution from Gulp Autoprefixer Not Working but it's not working out for me. The code that I used is: "use strict"; var gulp = require('gulp'); var sass = require('gulp-sass'); var prefix = require('gulp-autoprefixer'); var minify = require('gulp-minify-css'); var plumber = require('gulp-plumber'); function onError(err) { console.log(err); } gulp.task('sass', function(){ return gulp.src('src/style.scss') .pipe(sass()) .pipe(prefix({browsers:['last 2 versions']})) .pipe(minify())

Error running gulp-sass after update to Node v4.0.0

与世无争的帅哥 提交于 2019-12-09 17:32:59
问题 I updated to Node v4.0.0 and after when I run gulp in my projects I get an error with regards to gulp-sass/node-sass, as follows: Error: libsass bindings not found. Try reinstalling node-sass ? I've tried trashing all the node modules in the project and reinstalling, and I get some errors: npm WARN package.json package@0.0.0 No repository field. npm WARN package.json package@0.0.0 No license field. npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select' npm WARN

Cannot Install gulp-sass

╄→尐↘猪︶ㄣ 提交于 2019-12-08 19:37:42
问题 I'm trying to learn how to use gulp / sass / and all the other fun tools with Nodejs and I'm having an issue installing gulp-sass. The process I'm using to install everything is: 1. Start Git Bash in the project folder 2. npm init 3. npm install gulp -g 4. npm install gulp --save-dev 5. npm install gulp-sass <- this is where I get errors Once I get to step five, I get the following error: $ npm install gulp-sass npm WARN package.json project@1.0.0 No repository field. npm WARN package.json

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

十年热恋 提交于 2019-12-08 17:46:31
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 folder: |── dist └── bundle.css What I'd like to have happen is this, where the initial folder structure

Laravel Elixir not watching SASS import files for gulp

六眼飞鱼酱① 提交于 2019-12-08 02:59:57
问题 I have elixir set up to watch changes in .scss files, but changes in _partials.scss are not being watched. elixir(function(mix){ mix.browserSync([ 'resources/assets/bower/bootstrap-sass/assets/**/*' ], { proxy: 'site.app', reloadDelay: 200 }); }); When I edit the bootstrap/_variables.scss, gulp does compile those sass changes. If I exit gulp watch, and gulp watch again, then those changes appear. So I know its compiling correctly, its just somehow not watching those partial files. Any ideas?

gulp-ruby-sass not a recognized command in Windows

末鹿安然 提交于 2019-12-07 02:28:41
问题 I'm trying out gulp for the first time on a Windows Server 2012 VM. I'm normally a Mac user, so I'm a bit new to Windows & Powershell for dev tools like this. I installed Node.js & npm (and nothing else). I created the following basic Gulpfile to compile my Sass: Gulpfile.js var gulp = require('gulp'), sass = require('gulp-ruby-sass'); gulp.task('styles', function() { return gulp.src('Content/sass_new/application.scss') .pipe(sass({ style: 'expanded', })) .pipe(gulp.dest('Content/css')) });

Gulp SASS Sourcemap sources are incorrect

我的梦境 提交于 2019-12-06 05:07:41
问题 I am struggling to get my SASS sourcemaps to work correctly. The problem seems to be the "sources" attribute within the sourcemap and how my SASS files are nested. I have a Gulp task that compiles SASS to CSS. Here is an example of that var paths = { styles: { src: './Stylesheets/SCSS/', files: './Stylesheets/SCSS/**/*.scss', dest: './Stylesheets/CSS/' } } gulp.task('compile-sass', function (){ return gulp.src(paths.styles.files) .pipe(sourcemaps.init()) .pipe(sass({ outputStyle: 'compressed'

gulp-ruby-sass unable to import files

穿精又带淫゛_ 提交于 2019-12-05 21:28:57
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"; @import "dialogs.scss"; My gulp tasks: var paths = { sass: ['assets/css/styles.scss'] }; // SASS task

gulp-ruby-sass not a recognized command in Windows

空扰寡人 提交于 2019-12-05 07:33:34
I'm trying out gulp for the first time on a Windows Server 2012 VM. I'm normally a Mac user, so I'm a bit new to Windows & Powershell for dev tools like this. I installed Node.js & npm (and nothing else). I created the following basic Gulpfile to compile my Sass: Gulpfile.js var gulp = require('gulp'), sass = require('gulp-ruby-sass'); gulp.task('styles', function() { return gulp.src('Content/sass_new/application.scss') .pipe(sass({ style: 'expanded', })) .pipe(gulp.dest('Content/css')) }); gulp.task('watch', function() { gulp.watch('Content/sass_new/*', ['styles']); }) gulp.task('default', [

gulp-sass @import CSS file

China☆狼群 提交于 2019-12-05 01:42:01
Using gulp-sass I can include .scss files with @import 'filepath.scss'; But when I try to import normal css files with @import 'filepath.css' , It just added the import line of import url(filepath.css); to the output css file, rather than actually importing the code. How can I import CSS files as well as SCSS files? I want to do this to include files form bower. Here is my gulp function: // include gulp var gulp = require('gulp'); // include deps var minifyCSS = require('gulp-minify-css'), autoprefix = require('gulp-autoprefixer'), rename = require('gulp-rename'), sass = require('gulp-sass');