scope-styles-extractify

    0.1.2 • Public • Published

    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'));
    });

    Keywords

    none

    Install

    npm i scope-styles-extractify

    DownloadsWeekly Downloads

    3

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • rtsao