Giter VIP home page Giter VIP logo

builderz's Introduction

Builderz

Zero Configuration JavaScript Bundler

build/er/z is built originally to bundle monorepos, expanded later to cover more build cases with a wide variety of options. It implements rollup, taking advantage of its simplicity and customization to build one-step production bundler.

Install

npm install builderz

Easy to use

"build": "builderz"

Easy to customize

In your packages.json to compile to a CommonJS module (cjs) and minify the bundle just pass the required arguments.

"build": "builderz --formats=cjs --minify"

Or in a package.json file

"name": "my-package",
"version": "0.0.1",
"builderz":{
   "formats": ["cjs"],
   "minify": true,
}

Of course you cane import it as build package somewhere in your project:

const builderz = require("builderz");

// Multi-word options are camel-cased. Pass list as array.
const options = {};

builderz(options);

Options

  -m, --minify <boolean>       Minify bundle works only if format is provided (default: false)
  -p, --sourcemap <boolean>    Enable sourcemap in output
  -c, --camel-case <boolean>   Add camel-cased output file (default: true)
  -l, --clean-build <boolean>  Clean previous build folder (default: false)
  -t, --strict <boolean>       Enable Strict Mode (default: false)
  -r, --sort-pkg <boolean>     Enable sorting packages for monorepo (default: true)
  -d, --es-module <boolean>    Define Property exports- es_model (default: false)
  --formats <list>             Specific build format (default: [])
  --build-name <string>        Specific folder build name (default: "dist")
  --output <string>            Custom output name
  --pkg-paths <list>           Provide custom paths not in the root/src (default: [])
  --pkg-names <list>           Building specific package[s], in workspace (default: [])
  --alias <list>               Package Alias (default: [])
  --entries <list>             Add multi entries instead of default src/index. (default: [])
  --banner <string>            Add banner to output
  --external <list>            Passing external libraries not to bundle
  -h, --help                   display help for command

Test

npm test

License

This project is licensed under the GPL-3.0 License

builderz's People

Contributors

dependabot[bot] avatar jalal246 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

builderz's Issues

Add Ability to control output name

Current behavior Ability to change the folder destination name.

.option("-b, --build-name <string>", "Specific build name")

What should be: Ability to control the whole outputs dist/myCustomName.

The problem providing different outputs to different entries to formats.

Cannot find module './constants'

Error: Cannot find module './constants'
Require stack:
- node_modules\builderz\dist\builderz.cjs.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> 
     (\builderz\dist\builderz.cjs.js:99:17)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'node_modules\\builderz\\dist\\builderz.cjs.js',
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.