Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsv2013/sass-themes-combiner
SASS themes injector & combiner
https://github.com/tsv2013/sass-themes-combiner
gulp gulp-sass-themes plugin sass-themes-combiner themes
Last synced: 6 days ago
JSON representation
SASS themes injector & combiner
- Host: GitHub
- URL: https://github.com/tsv2013/sass-themes-combiner
- Owner: tsv2013
- License: mit
- Created: 2016-10-12T06:31:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-13T11:27:41.000Z (about 8 years ago)
- Last Synced: 2024-10-07T00:48:48.744Z (about 1 month ago)
- Topics: gulp, gulp-sass-themes, plugin, sass-themes-combiner, themes
- Language: JavaScript
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-sass-themes-combiner
[![NPM](https://nodei.co/npm/gulp-sass-themes-combiner.png)](https://npmjs.org/package/gulp-sass-themes-combiner)SASS themes injector & combiner.
A plugin for [Gulp](https://github.com/gulpjs/gulp) as extension of [gulp-sass](https://github.com/dlmanning/gulp-sass).
Inspired by [gulp-sass-themes](https://github.com/bbuhler/gulp-sass-themes).
## Usage
Source files
```
+-- styles
+-- _default-colors.scss
+-- body.scss
+-- form.scss
+-- login.scss
+-- themes
+-- _white.scss
+-- _black.scss
```Gulpfile
```javascript
'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`
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`).