Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukeed/bundt
A simple bundler for your delicious modules
https://github.com/lukeed/bundt
Last synced: about 1 month ago
JSON representation
A simple bundler for your delicious modules
- Host: GitHub
- URL: https://github.com/lukeed/bundt
- Owner: lukeed
- License: mit
- Created: 2019-01-05T23:37:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-19T22:35:24.000Z (over 2 years ago)
- Last Synced: 2024-10-02T20:18:00.541Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 219 KB
- Stars: 169
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license
Awesome Lists containing this project
- awesome-github-star - bundt
- awesome-list - bundt
README
A simple bundler for your delicious modules~!## Features
* Release CommonJS, ES Module, and UMD targets
* Easily configured through your `package.json`
* Optionally control Terser settings***Gotchas***
Your code is prepared for release targets ***as written***!
* Does not transpile your code
_AKA – no Babel or Buble_
* Does not inline dependencies
_AKA – no Rollup or Webpack_If you need either of these, using [`microbundle`](https://github.com/developit/microbundle) comes ***highly recommended***!
> Seriously, I write wonky ES5 code in a single file...
`bundt` only puts a name to the builder script I copy & paste between libraries.
You are 99.9999% more likely to do better with `microbundle` and/or to not outgrow it.## Install
```
$ npm install --save-dev bundt
```## Usage
```sh
# display help text
$ bundt --help# build with "lib/index.js" as your entry file
$ bundt lib/index.js# build with "src/index.js" (default)
$ bundt
```## Configuration
Most configuration lives within your `package.json` file. The following keys are evaluated:
* **"main"** — the destination for your CommonJS file
_Defaults to `dist/{pkg.name}.js` – always built!_* **"module"** — the destination for your ES Module file
_A ESM file will not be built if unspecified!_* **"unpkg"** or **"umd:main"** — the destination for your UMD file
_A UMD file will not be built if unspecified!_* **"umd:name"** or **"name"** — the globally exposed name for your UMD factory
_You should use an alternate `umd:name` if your `name` is not alphanumeric!_* **"modes"** — a map of "mode" names and their entry files
_Your `"default"` mode will use the destinations defined above.
All other modes replace `dist` with its name as the new directory._* **"terser"** — custom [Terser options](https://github.com/terser-js/terser#minify-options) for minification
_Alternatively, you may use a `.terserrc` file~!_## License
MIT © [Luke Edwards](https://lukeed.com)
Logo by [iconicbestiary](https://www.freepik.com/free-vector/various-desserts-bakery_1310918.htm#page=2&position=38)