Simple to use tool that packs and minifies JavaScript files into one single file.
This is a command line tool only. The following steps demonstrate the installation and usage.
- npm
npm install npm@latest -g
-
Install via NPM
npm i -g packk
-
Generate a packk.json template file. This is where all the configuration will be.
packk init
-
Configure the packk file
{ "output": "./dist/out.js", "prefix": "This will be shown before the source code in the packaged file", "anonymize": true, "files": [ "./src/foo.js", "./src/bar.js", "./src/foobar.js" ] }
Note: if the anonymize flag is set to true, the entire packaged code will be wrapped in an anonymous function so that it is not accessible from the browser console.
-
Package the source files
packk <filepath to packk.json file>
E-Mail: plate.felix@gmx.de
Project Link: https://github.com/tensoid/packk
NPM Link: https://www.npmjs.com/package/packk