0.1.0 • Published 8 years ago

removify v0.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

removify

travis-ci npm-version

Browserify transform to remove codes to which related specified module using AST.

Install

npm install removify

Usage

CLI

browserify -t [ removify -m <module-name> ] main.js -o bundle.js

Example

Now main.js given like:

var debug = require('debug'),
    d = debug('a')

d(0)

function b() {
  d(1)
  console.log(2);
}

d(3)

then use the browserify command to build main.js with -t [ removify -m debug ] to remove code to which related debug module:

browserify -t [ removify -m debug ] main.js -o bundle.js

and bundle.js will be outputed like:

function b() {
    console.log(2);
}

Test

% npm install
% npm test

License

MIT (c) keik