Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
# Public Typescript Library Template
# Standard error

1. Update package.json name, repository and issue url.
2. Update README.md release github workflow badge url.
3. Update jest.config.js suiteName to package name.
![release workflow](https://github.com/Nan0416/dev-kit/actions/workflows/release.yml/badge.svg)

![release workflow](https://github.com/sparrow2024/{[package]}/actions/workflows/release.yml/badge.svg)

![Latest PR workflow](https://github.com/sparrow2024/{[package]}/actions/workflows/pr.yml/badge.svg)
![Latest PR workflow](https://github.com/Nan0416/dev-kit/actions/workflows/pr.yml/badge.svg)

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)


## Setup Permission

The goal is to set up a github workflow that automaitcally builds and publishes the library artifact to the public npm repo when the code is merged into "main" branch.

You don't need to configure permission to download package. However, to publish package, you will need to manually create an npm token, and save it into the github action.

### Step 1. Create NPM token.

1. Go to https://www.npmjs.com/settings/{username}/tokens, choose "Classic Token", and select "Automation". Take a note on the generate token.

> To make it easy manage, name the token as "For {git repo name}".

2. Go to the github repo, "Settings" > "Secrets and variables" > "Actions" > Click "New repositoty secret". Set token name as "NPM_TOKEN" and paste the token generated from npm.
Serialize and deserialize JavaScript Error objects.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
reporters: [
'default',
['jest-junit', {
suiteName: '{package}',
suiteName: 'dev-kit',
outputDirectory: 'reports/test-reports',
outputName: 'junit.xml'
}]
Expand Down
Loading