ahjs-worker-bundler
Make a worker bundle from a Node.js package.
How to use
Run this tool from a directory containing package.json. Ideally, it should be installed as a dev dependency and set as a script. For simplicity, all configuration for the bundle is derived from package.json values, mostly using standard fields:
{
"private": true,
"files": [
"**/*.js"
],
"bin": {
"jobTypeA": "path/to/handlerA.js",
"jobTypeB": "path/to/handlerB.js"
},
"directories": {
"bin": "path/to/handlers/folder"
},
"engines": {
"node": ">= 16 < 18.3"
},
"scripts": {
"build-bundle": "ahjs-wb"
},
"dependencies": {
},
"devDependencies": {
"@ahjs/worker-bundler": "*"
}
}
All other fields are ignored, so they can be used for other purposes.
The output file will be ahjs-worker.tar.gz
.