cjsb

A CLI tool to build the CommonJS library quickly.

Usage no npm install needed!

<script type="module">
  import cjsb from 'https://cdn.skypack.dev/cjsb';
</script>

README

cjsb

A CLI tool to build the CommonJS library quickly.

It supports JavaScript and TypeScript, support Monorepo.

installation

npm i cjsb -D
yarn add cjsb --dev

usage

cjsb --source src --outDir lib --nodeVersion 8 --declaration

cjsb [--source path/to/folder] [--outDir outDirName] [--nodeVersion version] [--declaration]

monorepo

cjsb --source src --packages packages/c packages/a packages/b

Some packages in Monorepo depend on each other, cjsb will pack them in pass order.