Zero Configuration JavaScript Bundler
build/er/z
is built originally to bundle monorepos for one-step production.
And of course, it works for regular repo with a single package.
It does multiple things to save you some time and lets you focus on developing, that includes:
-
Gets all validate packages path by looking into the workplace - for monorepo.
-
Extract
JSON
from each package found in the workplace. To get essential production information. -
Cleans build folders if required.
-
Creates camelize name for your package if required or deal with custom output name.
-
If monorepo, sorts packages according to
core/dependency
, so core comes first and so on. -
Validate entries and aut-detect if
src/entry
or./entry
-
Creates a distension path for each project found with ability to name folder.
-
If there's no targeted format, it generates default formats
(CJS, UMD, ES)
one cycle minified with a map and the second is not. -
Highly customized. Reads local package build args first, resolves local paths. Prioritize local args to global ones.
-
Works as CLI and API.
npm install builderz
In your packages.json
to compile to a CommonJS module (cjs) and minify the
bundle just pass the required args.
"build": "builderz --formats=cjs --minify=false"
-s, --silent <boolean> Silent mode, mutes build massages (default: true)
-f, --formats <list> Specific build format (default: [])
-m, --minify <boolean> Minify bundle works only if format is provided (default: false)
-c, --camel-case <boolean> Add camel-cased output file (default: true)
-l, --clean-build <boolean> Clean previous build folder (default: false)
-b, --build-name <string> Specific folder build name (default: "dist")
-o, --output <string> Custom output name
-w, --pkg-paths <list> Provide custom paths not in the root/src (default: [])
-n, --pkg-names <list> Building specific package[s], in workspace (default: [])
-a, --alias <list> Package Alias (default: [])
-e, --entries <list> Add multi entries instead of default src/index. (default: [])
-r, --banner <string> Add banner to output
-h, --help display help for command
const builderz = require("builderz");
// Multi-word options are camel-cased. Pass list as array.
const options = {};
builderz(options);
npm test
-
packageSorter - Sorting packages for monorepos production.
-
corename - Extracts package name.
-
get-info - Utility functions for projects production.
-
validate-access - Validate project accessibility files.
-
move-position - Moves element in an array from index to another.
-
textics & textics-stream - Counts lines, words, chars and spaces for a given string.
This project is licensed under the GPL-3.0 License