0.0.6 • Published 8 years ago

gulp-sass-themes-combiner v0.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

gulp-sass-themes-combiner

NPM

SASS themes injector & combiner.

A plugin for Gulp as extension of gulp-sass.

Inspired by gulp-sass-themes.

Usage

Source files

+-- styles
    +-- _default-colors.scss
    +-- body.scss
    +-- form.scss
    +-- login.scss
    +-- themes
        +-- _white.scss
        +-- _black.scss

Gulpfile

'use strict';

const gulp = require('gulp');
const sass = require('gulp-sass');
const themesCombiner = require('gulp-sass-themes-combiner');

gulp.task("sass", function () {
    var themesCombiner = themesCombiner('./styles/themes/_*.scss');

    return gulp.src(['./styles/**/*.scss'])
      .pipe(themesCombiner.init())
      .pipe(sass.sync().on("error", sass.logError))
      .pipe(themesCombiner.combine('mySite'))
      .pipe(gulp.dest('./dist/styles'));
});

Output

+-- dist
    +-- styles
        +-- mySite.white.css
        +-- mySite.dark.css

Parameters

themes

Type: String | Array<String> Glob pattern to theme files.

options

cwd

Type: String Current working directory for glob pattern.

debug

Type: Boolean Verbose working mode.

ext

Type: String Theme file extension (.scss or .sass, default - .sass).

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago