node-sfxbundler
node-sfxbundler
is a Node module wrapper around the touchifyapp/sfx binary.
Getting Started
node-sfxbundler
works as a wrapper around the sfx
bundler.
It abstracts the commands' switches with JS object abstraction.
Installation
node-sfxbundler
can be installed using NPM:
$ npm install sfxbundler --save
Usage
First import node-sfxbundler
in your project:
var sfxbundler = require("sfxbundler");
Then use sfxbundler's commands:
sfxbundler.bundle("path/to/my.exe", "path/to/dir", { id: "my.app.id", version: "1.2.3", arch: "i386" });
node-sfxbundler
uses native Promise
to wrap asynchronous operations and resolves with the result of the command:
sfxbundler.bundle("path/to/my.exe", { certificate: "path/to/my/cert.pfx", password: "*******" });
.then(result => {
result.code
result.stdout
result.stderr
});
Command-line
node-sfxbundler
can work as a simple wrapper around touchifyapp/sfx.
# Install module globally
$ npm install sfxbundler -g
# Run module from command line
$ sfxbundler -exe path/to/sfx.exe -dir path/to/dir -id my.app.id
Documentation
sfxbundler.bundle(dest: string, dir: string, [options: BundleOptions]): Promise
Bundle a new sfx Executable using sfx bootstrapper.
export interface BundleOptions extends RunOptions {
id?: string;
arch?: "i386" | "x64";
type?: "sfx" | "sfxv";
run?: string;
dest?: string;
args?: string[];
version?: string;
compress?: number;
verbose?: boolean;
}
sfxbundler.run(args: string[], [runOptions: RunOptions]): Promise
Run SFX bundler by using raw arguments.
export interface RunOptions {
cwd?: string;
stdio?: string;
}
Contribute
Install Project dependencies
$ npm install
Build project
$ npm run build
License
MIT