New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
183
decreased by-47.11%
Maintainers
2
Weekly downloads
 
Created
Source

gulp-sass-partials-imported Build Status

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

Just add sassPartialsImported to the pipe

.pipe( sassPartialsImported(scss_dir, includePaths) )

Arguments

scss_dir (string) [required]

Folder where all the scss files are

includePaths (string|Array) [optional]

Path string, or Array of paths, where look in to attempt to resolve your @import declarations. (same as includePaths of node-sass)

Example

In the example below we have a watch task that, everytime we save a partial file, adds to the pipe all the scss 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/';
let includePaths = ['src/scss/vendors'];

gulp.task('sass', () => {
	gulp.src('src/*.scss')
		.pipe(cached('sassfiles'))
		.pipe(sassPartialsImported(scss_dir, includePaths))
		.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) - Davide Cantelli (http://ww.davidecantelli.it)

Keywords

FAQs

Package last updated on 30 Dec 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc