- Add a .npmrc file
registry=https://registry.npmjs.com/
@mermaid-js:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken="YOUR-TOKEN"
Generate the auth token from the github profile page => settings => developer settings => personal access tokens. Click on the button “Generate new token” and check the checkboxes concerning repo and github registry.
Instead of creating a .npmrc file on your own you can also use npm login --registry=https://npm.pkg.github.com which gives you an interactive prompt for entering your credentials.
- Do
npm install
npm install
- Run the script like below:
node src/cli.js -i test/state1.mmd