Skip to content

Browserify plugin to extract scope-styles css into an external bundle

License

Notifications You must be signed in to change notification settings

rtsao/scope-styles-extractify

Repository files navigation

scope-styles-extractify

build status coverage status dependencies status

Browserify plugin to extract scope-styles css into an external bundle

CLI usage

browserify -p [ scope-styles-extractify -o dist/main.css ] index.js

API usage

Write to file:

var browserify = require('browserify');
var extractify = require('scoped-styles-extractify');

var b = browserify('./main.js');
b.plugin(extractify, {output: './dist/scoped.css'});
b.bundle();

Or grab output stream:

var fs = require('fs');
var browserify = require('browserify');
var extractify = require('scoped-styles-extractify');

var b = browserify('./main.js');
b.plugin(extractify);

var bundle = b.bundle();
bundle.on('scoped_css_stream', function (css) {
  css.pipe(fs.createWriteStream('scoped.css'));
});

About

Browserify plugin to extract scope-styles css into an external bundle

Resources

License

Stars

Watchers

Forks

Packages

No packages published