- Full TypeScript support, linting, formatting, ESM and CommonJS bundles and many other developer's goodies with tsdx.
- Linting on precommit with
husky
andlint-staged
. - Multiple packages management with Lerna.
- Scoped private NPM packages with GitHub Packages.
- Basic extendable CI process with GitHub Actions.
- Ability to add CLI packages.
To use Github Packages registry you must provide Personal access token
with read:packages
and write:packages
scopes.
It can be stored in .npmrc
file in the root directory:
//npm.pkg.github.com/:_authToken=GITHUB_REGISTRY_ACCESS_TOKEN
@OWNER:registry=https://npm.pkg.github.com
always-auth=true
OWNER
is the name of the user or organization account that owns the repository.
GitHub docs on multiple packages at the same repository
In package.json
of every package:
"repository" : {
"type" : "git",
"url": "ssh://git@github.com/OWNER/REPOSITORY.git",
"directory": "packages/name"
},
OWNER
is the name of the user or organization account that owns the repository.
REPOSITORY
is the name of the repositroy containing the package.
Personal access token with packages scopes must be provided to GitHub Actions as NPM_TOKEN
(or you can rename it in `.github/workflows/main.yml):
To add a token to the repository: Settings
-> Secrets
-> New secret
.
- Use
template-demo-core
packageas a reference (package must include
package.json,
tsconfig.jsonand
src/index.ts`). - Run
yarn lerna bootstrap
.
Use template-demo-cli
package as a reference.
yarn lerna publish
Publish every changed package to registry. It will build packages before publish.
yarn lerna add <package> --scope=@<scoped/package>
yarn build