base-create-monorepo
Utility for npm init create-* scripts for monorepos.
Based on base-create
but for monorepos.
- ✨ Auto-installs dependencies.
- ✨ Auto-initializes
lerna
. - Baked-in
.gitignore
.
Note: If you want different options for different sub-packages, use base-create
directly.
With an initializer package create-custom-babel-monorepo
to create a monorepo project my-app
with two nested packages my-first-package
and my-second-package
,
pass a comma-delimited list of package names to the command after the project name:
$ npm init custom-babel-monorepo my-app my-first-package,my-second-package
Or if you wanted an npm scope @my-org
on your package names (@my-org/my-app
, @my-org/my-first-package
, and @my-org/my-second-package
),
pass the org as an argument after the project name but before the package names:
$ npm init custom-babel-monorepo my-app @my-org my-first-package,my-second-package
Here is example source of such an initializer.
Options at the root apply to the root package,
and eachPackage
defines options to apply to all sub-packages:
#!/usr/bin/env node const createMonorepo = ; ;