0.4.2 • Published 10 years ago

viralify v0.4.2

Weekly downloads
495
License
-
Repository
github
Last release
10 years ago

viralify build status

Injects browserify transforms into specified dependencies of a package recursively.

viralify . -t browserify-swap -p ansicolors
var viralify = require('viralify');

viralify(root, [ 'foo', 'bar' ], 'browserify-swap', function (err) {
  if (err) return console.error(err);
  // package.json's of packages 'foo' and 'bar', found in root and below,
  // now have 'browserify-swap' added to the end of their 'browserify.transform' field
})

Installation

npm install viralify

Usage

viralify <path> <options>

  Inject browserify transform(s) into the package.json files of specified packages at and below the given path.

OPTIONS:

  -t, --transform   transform(s) to inject (required)
  -p, --packages    packages into which to inject the transforms (required)
  -f, --front       if set, the transform(s) are injected in the front of the transform field so they run first

EXAMPLES:

  Inject 'browserify-swap' transform for all foo dependencies of the package in the current directory

    viralify . -t browserify-swap -p foo

  Inject 'envify' and 'es6ify' transforms in front for all foo and bar dependencies of the package
  in the current directory

    viralify ./node_modules --transform envify --transform es6ify --front --package foo -p bar

API

generated with docme

viralify.sync(root, packages, transform, front)

Same as viralify but performed synchronously.

License

MIT

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago