A CLI tool to build the CommonJS library quickly, supports JavaScript, TypeScript and Monorepo.
npm i cjsb -D
yarn add cjsb --dev
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.