Nearly Perpendicular Macaroons
Miss any of our Open RFC calls?Watch the recordings here! »

depsify

5.0.0 • Public • Published

depsify

version status coverage dependencies devDependencies node

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

Install

npm i depsify

DownloadsWeekly Downloads

17

Version

5.0.0

License

MIT

Last publish

Collaborators

  • avatar