You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gulp-sass-partials-imported

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-sass-partials-imported

It process scss partials files and add the files that import them to the pipe.

1.0.3
Source
npmnpm
Version published
Weekly downloads
131
Maintainers
2
Weekly downloads
 
Created
Source

gulp-sass-partials-imported

It process scss partials files and add the files that import them to the pipe.

Use it with gulp-cached and gulp-sass to create a watch task that avoid the re-compile of all the scss files in the project everytime you save one of them, saving a lot of time.

Install

$ npm install --save-dev gulp-sass-partials-imported

Usage

In the example below we have a watch task that, everytime we save a partial file, adds to the pipe files that import the partial file.

const gulp = require('gulp'),
const sass = require('gulp-sass');
const cached = require('gulp-cached');
const sassPartialsImported = require('gulp-sass-partials-imported');

let scss_dir = 'src/scss/';

gulp.task('sass', () => {
	gulp.src('src/*.scss')
		.pipe(cached('sassfiles'))
		.pipe(sassPartialsImported(scss_dir))
		.pipe(sass({ includePaths: scss_dir }).on('error', sass.logError))
		.pipe(gulp.dest('dist'));
});


gulp.task('watch', function () {

    gulp.watch('src/*.scss', ['sass'])

});

License

MIT © G100g(http://g100g.net)

Keywords

gulpplugin

FAQs

Package last updated on 10 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts