https://github.com/acss-io/gulp-atomizer
Gulp plugin for Atomizer.
https://github.com/acss-io/gulp-atomizer
Last synced: about 1 month ago
JSON representation
Gulp plugin for Atomizer.
- Host: GitHub
- URL: https://github.com/acss-io/gulp-atomizer
- Owner: acss-io
- License: mit
- Created: 2015-12-03T23:02:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T23:17:46.000Z (over 7 years ago)
- Last Synced: 2024-11-07T02:47:22.200Z (7 months ago)
- Language: JavaScript
- Homepage: http://bit.ly/1VKINsY
- Size: 44.9 KB
- Stars: 14
- Watchers: 6
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-atomizer
Gulp plugin for [Atomizer](https://github.com/yahoo/atomizer).
[](https://badge.fury.io/js/gulp-atomizer) [](http://packagequality.com/#?package=gulp-atomizer)
## Installation
```bash
npm install --save-dev gulp-atomizer
```## Example
```js
var gulp = require('gulp');
var acss = require('gulp-atomizer');gulp.task('acss', function() {
return gulp.src('./*.html')
.pipe(acss())
.pipe(gulp.dest('dist'));
});
```## Full API Example
```js
var gulp = require('gulp');
var acss = require('gulp-atomizer');gulp.task('acss', function() {
return gulp.src('./*.html').pipe(acss({
// the filename of your output file.
// Default is `atomic.css`
outfile: 'atoms.css',
// Configuration options to pass to atomizer.
// This will have your variables, breakpoint definitions, etc.
// Either `require` it from a separate file or include it inline
acssConfig: require('./acssConf.js'),
// Custom css generation options to pass to atomizer's `getCSS` function.
// This is an undocumented feature of atomizer, so I don't test for it.
cssOptions: {
namespace: '#atomic'
},
// A hook for another undocumented feature of atomizer.
// You can use it to create custom ACSS 'functions'.
// Calls `acss.addRules(options.addRules)` under the hood.
// See the tests for an example of how to use this.
addRules: require('./rules.js')
})).pipe(gulp.dest('dist'));
});
```## Testing
Uses [Mocha](http://mochajs.org/) under the hood.
```bash
npm run test
```