csse
v0.1.0
Published
Process CSS with events
Downloads
4
Maintainers
Readme
CSSE
CSSE is a PostCSS plugin tp process CSS with events.
/* before */
/* after */
Usage
Follow these steps to use CSSE.
Add CSSE to your build tool:
npm install postcss-csse --save-dev
Node
require('postcss-csse')({ /* options */ }).process(YOUR_CSS);
PostCSS
Add PostCSS to your build tool:
npm install postcss --save-dev
Load CSSE as a PostCSS plugin:
postcss([
require('postcss-csse')({ /* options */ })
]);
Gulp
Add Gulp PostCSS to your build tool:
npm install gulp-postcss --save-dev
Enable CSSE within your Gulpfile:
var postcss = require('gulp-postcss');
gulp.task('css', function () {
return gulp.src('./css/src/*.css').pipe(
postcss([
require('postcss-csse')({ /* options */ })
])
).pipe(
gulp.dest('./css')
);
});
Grunt
Add Grunt PostCSS to your build tool:
npm install grunt-postcss --save-dev
Enable CSSE within your Gruntfile:
grunt.loadNpmTasks('grunt-postcss');
grunt.initConfig({
postcss: {
options: {
processors: [
require('postcss-csse')({ /* options */ })
]
},
dist: {
src: 'css/*.css'
}
}
});