Siorki / RegPack

Self-contained packer for size-constrained JS code
Other
301 stars 14 forks source link

RegPack is a packer intended for use on minified Javascript code. Current revision is 5.0.4

It is mostly suited to small size constraints (1kb, up to 4kb).

The current version works in seven stages :

The text boxes show intermediate stage results. Best one gets a green highlight :

--

Usage tips

Use it online or integrate it into your Node workflow (thanks to kanaka)

CLI usage

regpack input.js > output.js
regpack input.js --crushGainFactor 1 --crushLengthFactor 0 --crushCopiesFactor 0 > output.js

From STDIN

cat input.js | regpack - > output.js

--

Running unit tests with Node

cd tests
node AllTests

--

License

Licensed under MIT license.

Code produced by RegPack, including the hashing (if included) and unpacking routines, is not affected by the license. No restriction to its usage or redistribution arise from its compression by RegPack.

--

Any feedback or improvement suggestions appreciated. Contributions welcome.

@Siorki on Twitter