Nondeterministic Palindrome Machine
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

bryles

0.0.2 • Public • Published

Bryles

A highly opinionated package for compiling css (from Stylus) in node and inlined using browserify.

Apart from Stylus also Autoprefixer and clean-css (with the compress flag) is applied.

var bryles = require('bryles');
var insertCss = require('insert-css');
 
bryles.compile(__dirname + '/index.styl', function( err, css ){
    if (err)
        return console.error(err);
 
    // browser context?
    if (typeof window !== 'undefined')
        insertCss(css);
});

An optional argument before the callback is allowed for configuration. So far the only option is compress which will minify your styles using clean- css.

bryles.compile(__dirname + '/index.styl', {
    compress: true,
}, cb);
var bryles = require('bryles');
var browserify = require('browserify');
 
browserify()
    .transform(bryles, {
        compress: true,
    })
    .add('index.js')
    .bundle()
    .pipe(fs.createWriteStream('bundle.js'));

If you need anything else (sass support?) or more flexibility, send a pull request.

You might be interested in Brarkup.

Keywords

none

install

npm i bryles

Downloadsweekly downloads

2

version

0.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability