rapidbundle v0.19.1
RapidBundle
Installation
npm i -D rapidbundle
# or with yarn
yarn add -D rapidbundleUsage
npx rapidbundle
# or with yarn
yarn rapidbundleGitHub Action
- Creates a single file bundle for each entry
Scans
action.ymlto obtain build info- Infers entries from the
.runs.main,.runs.preand.runs.postfields - Infers target Node version from the
.runs.usingfield
- Infers entries from the
Constraints:
- Entry file should be located in the
srcdirectory. - Output files should be located in the
distdirectory.
This allows us to properly infer entry point name from the action.yml.
For example, if you have action.yml like that:
runs:
using: "node12"
pre: "./dist/setup.js"
main: "./dist/index.js"
post: "./dist/cleanup.js"It will produce 3 output files in dist directory and look for the same file
paths in src directory
├─ src
│ ├─ setup.ts
│ ├─ index.ts
│ └─ cleanup.ts
├─ dist
│ ├─ setup.js
│ ├─ index.js
│ └─ cleanup.js
└─ action.ymlNode Package
- Creates a single file bundle for each entry
Scans
package.jsonto obtain build info- Infers entries from the
.bin,.main,.moduleand.typesfields - Infers target Node version from the
.engines.nodefield
- Infers entries from the
Constraints:
- Entry file should be located in the
srcdirectory. - Output files should be located in the
distdirectory.
This allows us to properly infer entry point names from the package.json.
For example, if you have package.json like that:
{
"bin": "./dist/cli.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts"
}It will produce 3 output files in dist directory.
├─ src
│ ├─ cli.ts
│ └─ index.ts
├─ dist
│ ├─ cli.js
│ ├─ index.js
│ ├─ index.cjs
│ └─ types.d.ts
└─ action.ymlLimitations
File names should not have multiple . signs in it:
dist/mod.jswill be mapped tosrc/modand extension will be resolved automaticallydist/mod.es.jswill be mapped tosrc/mod.esand will use.esextension
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago