depsify
Allow css modules to declare their dependencies and pack in custom ways
Last updated 5 years ago by zoubin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install depsify 
SYNC missed versions from official npm registry.

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

Current Tags

  • 5.0.0                                ...           latest (5 years ago)

8 Versions

  • 5.0.0                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 3.1.0                                ...           5 years ago
  • 3.0.1                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (8)
Dev Dependencies (6)

Copyright 2014 - 2016 © taobao.org |