sfxjs

1.0.2 • Public • Published

SFX JS

This utility allows you to turn any server-side (Node.js) JavaScript file into a self-extracting script.

Algorithm of operation:

  1. The source file is compressed using the Brolti algorithm
  2. 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.

Readme

Keywords

Package Sidebar

Install

npm i sfxjs

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

10.8 kB

Total Files

11

Last publish

Collaborators

  • xtreme