depsify
v5.0.0
Published
Allow css modules to declare their dependencies and pack in custom ways
Downloads
27
Readme
depsify
Allow css modules to declare their dependencies and pack in custom ways. See reduce-css.
The main ideas are borrowed from browserify
Related
Example
var Depsify = require('../')
var path = require('path')
var del = require('del')
var fixtures = path.resolve.bind(path, __dirname)
var DEST = fixtures('build')
var atImport = require('postcss-simple-import')
var url = require('postcss-custom-url')
var vars = require('postcss-advanced-variables')
del(DEST).then(function () {
new Depsify({
basedir: fixtures('src'),
entries: ['a.css', 'b.css'],
processor: [
atImport(),
url(url.util.inline),
vars(),
],
})
.bundle()
.pipe(process.stdout)
})
var b = new Depsify(entries, options)
Options
basedir
entries
plugin
transform
processor
- And all options supported by css-module-deps
Methods
add(file, opts)
plugin(p, opts)
transform(tr)
processor(p)
bundle()
Events
file
transform
dep
reset
bundle