Node.js packaging utility to bundle javascript and resource files.
Install NPK globally via NPM:
npm install npk -g
Using command to package your project:
npk tests/purejs/
Then you can find out the package in there:
tests/purejs/out/app.js/
You can run packaged application directly:
node tests/purejs/out/app.js/app.js
Remove Mock-up (default)
npk [project path]
Mom doesn't recognize
npk [project path] --mom-doesnt-recognize
Dad doesn't recognize
At this level, NPK is packaging your project with C/C++ compiler, to generate a Node.js native module.
npk [project path] --dad-doesnt-recognize
Note: Node.js native module has machine code inside, there is no way to work on cross-platform. If you need to support several various platform for your project, it must re-package on target platform what you want.
NPK is similar to general compiler for computer language. With linking and managing symbol table, NPK can bundle multiple JavaScript source code files, that's just like that compiler is getting objects for making a single binary file.
Actual mechanism to package JavaScript source code files:
- Getting source files defined in the 'npk_target' property in package.json.
- Generating symbol table for storing source code files.
- Linking and bundling symbol table files to generate a single file.
Licensed under the MIT License
Copyright(c) 2013 Fred Chien <[email protected]>