Pick a name for the new project:
PROJECT=new-lib-nameThen:
gh repo create $PROJECT --public
gh repo clone $PROJECT
cd $PROJECT
npx degit IlyaSemenov/npm-package-starter --forceSearch and replace mylib with the new project name.
Install development dependencies:
pnpm iWrite sources under src, build with:
pnpm buildWrite tests under src and tests as *.test.ts, run with:
pnpm testPrepare package documentation:
mv README.lib.md README.mdFill description in package.json.
Commit:
git add .
git commit -m "Initial release"Setup Github Actions:
gh repo view --webUnder Settings > Secrets and variables > Actions > New repository secret:
- Add new secret
NPM_TOKEN.
Under Settings > Actions > General > Workflow permissions:
- Choose: Read and write permissions.
- Enable: Allow GitHub Actions to create and approve pull requests.
Push repo:
git push -u originUnder Pull Requests, open the new "Version Packages" PR and click Rebase and Merge.