A TypeScript NPM starter (or example) project to ease setup of NPM packages from your GitHub repo
- git clone https://github.com/uzenith360/npm-package-starter
- npm install
- Search/replace my github handle and NPM Package name/Github repo with yours
- Create github/NPM/Synk auth tokens (See secrets section below) and add to the secrets in your github repo
For this setup you will need to create 3 auth tokens and save them as secrets in your github repo's settings,
- NPM token: An Automation-type access token from npm to be used solely in CI environments so that it is able to work around your account’s 2FA. To create one, go to https://www.npmjs.com/settings/<your-npm-account>/tokens. Be sure to select the type “Automation” as this will be used in a CI/CD workflow. i named it NPM_TOKEN
- Github repo token: A personal access token from GitHub, to enable github actions access your public repositories. To create one go to https://github.com/settings/tokens select Personal access tokens > Tokens (Classic). Click on the button to create new token and select repo (Full control of private repositories), write:packages and delete:packages. I named it GH_Token
- Synk API token: Snyk is a tool that simplifies security checks, to help monitor for, alert on, and offer assistance to mitigate vulnerabilities. Snyk is free, so sign-up and get your Snyk API Token. Add your Snyk API Token as a Repository Secret on GitHub: https://github.com/<your-account-or-organization>/<your-repo-name>/settings/secrets/actions/new. I named it SNYK_TOKEN
I would like to acknowledge the authors of these blogs for providing helpful content on the topic, I encourage you to read too :)
For support, open an issue or email wogwugwu.zenith@gmail.com, I will do my best to respond to all issues
Don't forget to search/replace my github handle and NPM Package name/Github repo with yours, after you fork/clone/download this repo :)