pkg-edit
v1.1.4
Published
Modify software information after packaging with [pkg]
Downloads
6
Readme
Modify software information after packaging with pkg
how to use
Introduce pkg-edit in the current project:
npm i -D pkg-edit
Initialize configuration information (only needs to be executed once):
npx pkg-edit init
, It will generate a pkg.config.js in your projectmodule.exports = { // You need to pay attention to this, this is the exe file generated by pkg file: "./release/build.exe", // ... };
You can edit your
package.json
like this:{ // ... "scripts": { "build:win": "pkg -t win -o release/build.exe src/index.js && pkg-edit build" // pkg saves the exe file to release/build.exe, pkg-edit will read and modify it according to the configuration } // ... }
can also be used like this
- Execute
npx pkg-edit
init in the project directory - You can view
pkg.config.js
and modify some predefined configurations. You must specify thefile
field to point to the exe packaged bypkg
- Execute
npx pkg-edit build
, it will generate a new exe file according to the content ofpkg.config.js