sfxjs
v1.0.2
Published
Create compressed SFX JavaScript file
Downloads
3
Readme
SFX JS
This utility allows you to turn any server-side (Node.js) JavaScript file into a self-extracting script.
Algorithm of operation:
- The source file is compressed using the Brolti algorithm
- A small download script (about 1 Kb) is written at the beginning of the source file, which uncompresses and starts the compressed source file
The advantage of using this utility is that the size of the source file is reduced by compression, which reduces the file size by several times.
No external dependencies are required for the utility to work.
Usage
In order to pack a file, you must install sfxjs in "global" mode:
npm i sfxjs -G
Then, go to the directory where you would like to pack a file, and execute the following command:
sfxjs source.js result.js
Important: after the first run, the "packed" version is replaced with "unpacked" one. This means that it's only useful for distribution and download links.