From 0a167cdda630cd8e4315a6b261fd75c70d80d1ce Mon Sep 17 00:00:00 2001
From: AkashRajpurohit
-
-
+
+
@@ -26,6 +26,8 @@
Bug report
ยท
Feature request
+ ยท
+ Read Docs
A project template to bootstrap NPM package with Typescript
Generated using TypeDoc
Generated using TypeDoc
+ + + + + + + + + + + + + + + + + + + + +
+ Bug report + ยท + Feature request +
+ +@akashrajpurohit/ts-npm-template
is a opinionated bootstrap template to create NPM packages.
Click on the "Use this template" button from the options to create a new repository using this template.
+That is pretty much it, follow the steps for creating a new repository and its done ๐
+Few configurations are required for making the publishing and releasing to NPM automated.
+First thing is to generate a NPM token. Automation tokens are recommended since they can be used for an automated workflow, even when your account is configured to use the auth-and-writes level of 2FA.
+Save this token as NPM_TOKEN
in github actions secrets.
If you want to generate a code coverage badge for your package, you need to follow the steps and configure the gist mentioned by dynamic-badges-action.
+You need to add the GIST_SECRET
in the github actions secrets if you are planning to add the code coverage badge.
Once you have followed the steps above and created a gist, uncomment these lines in the workflow file
+- name: Get Coverage for badge ๐ข
run: |
COVERAGE="$(cat coverage/coverage-summary.json | jq -r '.total.lines.pct')"
echo "COVERAGE=$(echo ${COVERAGE})" >> $GITHUB_ENV
- name: Create coverage badge โ๐ฝ
uses: schneegans/dynamic-badges-action@v1.6.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: <gist-id>
filename: <file-name>.json
label: Code Coverage
message: ${{ env.COVERAGE }}
color: green
namedLogo: vitest
+
+++Note: Make sure you change the
+<gist-id>
and<file-name>
in the ci.yml file along with the gist id in the coverage badge link in the README.md file.
Follow the contribution guidelines to contribute to this project.
+If you encounter any problems feel free to open an issue. If you feel the project is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull requests are also welcome.
+++Are you using this template for your project? Feel free to open a PR and add your project to the list.
+
Generated using TypeDoc
Generated using TypeDoc
Adds two numbers
+