0.5.0 • Published 3 years ago

bergamot v0.5.0

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

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"

module.exports = {
    project: {
        entry_point: "<path_to_folder>/index.js",
        bundle_path: "<path_to_bundle>/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 <command> <config-key>

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:

module.exports = {
    config_key: {
        root_path: "<path_to_root_folder>",
        entry_point: "<path_to_folder>/index.js",
        bundle_path: "<path_to_bundle>/bundle.min.js", //file name can be changed
        js_transform: (js) => ''// custom js transformation 
    },
    other_config_key: {
        entry_point: "<path_to_folder>/index.js",
        bundle_path: "<path_to_bundle>/bundle.min.js", //file name can be changed
    }
}

then call

bergamot watch other_config_key

License

Application is MIT licensed.

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

4.9.5

9 years ago