require-bundler

1.0.76 • Public • Published

$ sudo npm install require-bundler

Copy rqBundle into your project folder (from the require-bundler module's folder or the node_modules/.bin/ folder) or reference it as you will. To bundle all files required from file , run

$ ./rqBundle <file1> <bundled-output-file>

THE FOLLOWING STATEMENTS/TOKEN COMBINATIONS ARE NOT SUPPORTED


var exports  
module["exports"]  
require(variable);  
require(anyThingThatIsNotAString);  
module.anyThingAsideFromExports

EXPECTATIONS


module   /*whitespace and comments are tolerated*/   . exports  
require  (  "./myModuleDir/../myModuleDir/myModule")  
require("./myOtherModule.js")  
myObj.exports   // just an object property that shouldn't be affected  
exports         // will be edited

Expect the <bundled-output-file> to be obfuscated unless you edit rqBundle and remove the UglifyJS content.

Warning: the bundled file cannot be run in places that it cannot access the node_modules folder (or the views folder if you're using Express).

Package Sidebar

Install

npm i require-bundler

Weekly Downloads

0

Version

1.0.76

License

ISC

Last publish

Collaborators

  • mr.sparks