0.1.1 • Published 11 years ago

pack-exporter v0.1.1

Weekly downloads
3
License
BSD
Repository
github
Last release
11 years ago

=======

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()
}