pack-exporter

0.1.1 • Public • Published

======= packer

Packer will take an entry point and traverse "require" dependencies, packing the related files in an output directory

Usage

Packer supports the following CLI options:

-s : Source file. This is the entry point for traversal
-o : Output directory. This defaults to 'source/file/directory/package'

And can be run like this:

node run.js -s '/this/is/the/source/file'

Known limitations

  • The generated package.json file will reference the wilcard (*) versions of the modules.
  • Modules which are required dynamically not parse correctly and will not be included in the packaged output. eg:

Replace

for (var files in directory){
  var mymod = require(file);
  mymod.init()
}

with

var mods = [require('0'),require('1'), ... require('n')]
for (mod in mods){
  mods[mod].init()
}

Package Sidebar

Install

npm i pack-exporter

Weekly Downloads

1

Version

0.1.1

License

BSD

Last publish

Collaborators

  • registered