Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boomyjee/bergamot
TeaCSS/CommonJS capable simple and blazing fast bundler without AST transforms
https://github.com/boomyjee/bergamot
Last synced: about 1 month ago
JSON representation
TeaCSS/CommonJS capable simple and blazing fast bundler without AST transforms
- Host: GitHub
- URL: https://github.com/boomyjee/bergamot
- Owner: boomyjee
- License: mit
- Created: 2020-04-05T22:35:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T23:44:56.000Z (over 2 years ago)
- Last Synced: 2024-08-09T12:08:14.585Z (4 months ago)
- Language: JavaScript
- Size: 53.7 KB
- Stars: 43
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-blazingly-fast - bergamot - TeaCSS/CommonJS capable simple and blazing fast bundler without AST transforms (JavaScript)
README
TeaCSS/CommonJS capable simple and blazing fast ES6-only bundler without AST transforms.## Description
Bundle css & js into single file
Can also process `.tea` files (see teacss.org)## Install
```
npm install --global bergamot// or run without install
npx bergamot watch
```## Use
create "bergamot.config.js"
```javascript
module.exports = {
project: {
entry_point: "/index.js",
bundle_path: "/bundle.min.js",
js_transform: (js) => require("@babel/core").transform(js, {
plugins: ["@babel/plugin-transform-arrow-functions"]
}); // custom js transformation (can be used with babel)
}
}
```Then in console:
```
bergamot
```### Commands
- "build" - build project files (dev build)
- "watch" - build and watch for changes
- "minify" - build and minify (for production)You can have multiple bundles in one config file:
```javascript
module.exports = {
config_key: {
root_path: "",
entry_point: "/index.js",
bundle_path: "/bundle.min.js", //file name can be changed
js_transform: (js) => ''// custom js transformation
},
other_config_key: {
entry_point: "/index.js",
bundle_path: "/bundle.min.js", //file name can be changed
}
}
```
then call
```
bergamot watch other_config_key
```### License
Application is [MIT licensed](./LICENSE).