pkgsetuphelper
v1.1.2
Published
Helper utility for setting up pkg in certain projects
Downloads
4
Readme
pkgsetuphelper:
Information:
This is a utility module for projects that use pkg
. This package is designed to make setting pkg
up with your packages easier in cases where:
- You have
pkg
globally installed, but some environments prevent you from calling global NPM packages from command line - The main entry point for your built application needs to be the main entry file listed in your
package.json
, and you only need to target windows - No additional assets need to be bundled with you packaged application that are not automatically included by
pkg
Installation:
npm install pkgsetuphelper
Usage:
To automatically configure your package.json
to add a command to build your application:
Add the following line of code near the start of our package's main entry point:
require('pkgsetuphelper').setupPKG('applicationNameHere');
This will automatically add a script named pkg
to your package that builds your application:
- After this script has been added, you are free to either leave the above code snippet in or remove it
- I recommend leaving this snippet in your application to ensure your
pkg
script always works properly
You can then package your app using the following command:
npm run pkg
⚠️ This project was intentionally designed for a very narrow set of use-cases. I will not be implementing additional features or changes suggested via feedback!