Coder Social home page Coder Social logo

gulp-sassc-shell's Introduction

gulp-sassc-shell

If your SASS compiles slow, then try this plugin, compile SASS to CSS faster then ever before using libsass from Gulp using shell. This plugin works with sassc binary compiled for you platform. For compiling sassC on you platform follow this guide: https://github.com/sass/sassc .

Getting Started

This plugin requires Gulp ~3.9.1

If you haven't used Gulp before, be sure to check out the Getting Started guide. Once you're familiar with that process, you may install this plugin with this command:

npm install gulp-sassc-shell --save-dev

Once the plugin has been installed, it may be enabled inside your Gulpfile with this line of JavaScript or with the matchdep npm package (gulp-*) syntax:

const sassc = require('gulp-sassc-shell');

The sassc task

Overview

In your project's directory, add a task with any name you want, and select the *scss file from your project, then pipe it to the plugins function.

gulp.task('build-cssC', function () {
	return gulp.src('./scss/*.scss').pipe(
		sassc({
			outputStyle: 'nested',
			sourceMap: true,
			precision: 3,
			destination: "css/dist"
		})
	);
});

Options

This plugin only support the options that sassc binary does. These are the following:

outputStyle

Alias: style Type: String Default value: 'nested'

Output style. Can be nested, compact, compressed, expanded.

precision

Type: String Default value: '3'

How many digits of precision to use when outputting decimal numbers.

loadPath

Type: String|Array

Add a (or multiple) Sass import path.

sourceMap

Type: String
Default: false

If set to true a sourceMap uri will be injected to the end of the destination file.

destination

Type: String
Default: false

Destination is a required property to use sassc binary. Sassc binary will get this parameter to generate the css to this directory.

Usage Examples

Default Options

gulp.task('build-cssC', function () {
	return gulp.src('./scss/*.scss').pipe(
		sassc({
			outputStyle: 'nested',
			sourceMap: true,
			precision: 3,
			destination: "css/dist"
		})
	);
});

Contributing

Feedbacks are welcome. If you want to contribute, send a mail to me: [email protected] .

Release History

0.0.1 - 2018.06.18 - First release

License

MIT © Gyorgy Sagi

gulp-sassc-shell's People

Contributors

iamdue avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.