This is a template repository for developing libraries for Browser/Node.js with TypeScript.
Rewrite the following items in package.json in each folder as appropriate.
- name
- description
- keywords
- repository
- author
- bugs
- homepage
Next, rewrite the signature and number of years in the LICENSE file.
Copyright (c) 20xx your_name
Rewrite the repo option in Changeset.
"changelog": [
"@changesets/changelog-github",
{ "repo": "your_name/repository_name" }
],
Also, do not forget to rewrite the title of CHANGELOG.md.
Implement a great library under the packages folder.
Be sure to provide proper test code so that users of the library can feel comfortable.
Execute the following commands to confirm that the build and test pass successfully.
Be careful not to publish libraries that do not work properly.
$ yarn build
$ yarn test
Write a description of the library in README.md.
It is also a good idea to create a simple project under the examples directory so that you can check the operation by simply cloning the repository.
It is important to keep the project as simple as possible, as complex projects take time to understand.
To publish the library to NPM, add the NPM access key with the key NPM_TOKEN
to the repository secret.
This will automatically publish the library to NPM when the release workflow is executed.
The following command can be used to create a patch to update the library version.
$ yarn changeset
When the patch is committed to the main branch, CI will run and create a PR for the release.
Then, simply merge the PR for release and the library will be automatically published to NPM.