node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

basswork

Basswork

CSS preprocessor for Basscss built with Rework

Rework Plugins Included:

  • Rework NPM
  • Rework Custom Media
  • Rework Vars
  • Rework Calc
  • Rework Plugin Colors

Install

npm install basswork

Usage

Node

Pass an unprocessed CSS string to Basswork, which will return the processed CSS.

var basswork = require('basswork');
var fs = require('fs');
 
var src = fs.readFileSync('./src/base.css', 'utf8');
var css = basswork(src);
fs.writeFileSync('./css/base.css', css);

Options

Pass Rework options as the second argument, and Rework stringify options as the third argument. Basswork also includes a namespace option to prefix styles with a string followed by a hyphen.

var css = basswork(src, { namespace: 'u' }, { compress: true });

Command Line

$ basswork in.css out.css
$ basswork --sourcemap in.css out.css

MIT License