import_tree() example for Stylus
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
stylus-sources
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Style import_tree Proof Of Concept

This is a dummy exampe of import_tree implementation. Consider you have a directory with files you need to import, instead of writing bunch of @import statements in your stylus file, you might want to simply call import_tree():

import_tree('./foobar');

// insted of:
// @import 'foobar/a'
// @import 'foobar/b'
// @import 'foobar/c/d'

NOTICE you can't flexibly control order of inclusions in this case. The only way you can control the order in this example is filenames, imports are done in alphabetical order. For total controll over what is included when and where, use Mincer, which will give you awesome cow power!

How to run

npm install
node .