0.1.9 • Published 9 years ago

ss-stylus v0.1.9

Weekly downloads
47
License
-
Repository
github
Last release
9 years ago

Stylus (CSS) wrapper for SocketStream 0.3

Allows you to use Stylus files (.styl) in your SocketStream project.

Instructions

Add ss-stylus to your application's package.json file and then add this line to app.js:

ss.client.formatters.add(require('ss-stylus'));

Nib is included by default. To use this in your app add:

@import 'nib'

at the top of your .styl file.

JavaScript variable injection

The ss-stylus wrapper allows you use JavaScript variables within your Stylus code.

This can be useful if you need to serve assets from a CDN in production. For example:

var ssStylus = require('ss-stylus');
var assetsPath = 'https://s3.amazonaws.com/example_assets_path/';

ssStylus.prependStylus('$assetsPath = \'' + assetsPath + '\'');
ss.client.formatters.add(ssStylus);

Including CSS imports

To include CSS imports, pass these options to loading the ss-stylus library:

ss.client.formatters.add(require('ss-stylus'), { 'include css' : true });
0.1.9

9 years ago

0.1.8

10 years ago

0.1.7

11 years ago

0.1.6

11 years ago

0.1.5

12 years ago

0.1.4

12 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago