Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngekoding/ts-starter-library
Starter template to create typescript library
https://github.com/ngekoding/ts-starter-library
js-library library-template ts-library
Last synced: 1 day ago
JSON representation
Starter template to create typescript library
- Host: GitHub
- URL: https://github.com/ngekoding/ts-starter-library
- Owner: ngekoding
- License: mit
- Created: 2024-03-22T16:34:18.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-03-23T09:57:55.000Z (10 months ago)
- Last Synced: 2024-12-30T23:05:27.048Z (9 days ago)
- Topics: js-library, library-template, ts-library
- Language: JavaScript
- Homepage:
- Size: 83 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-starter-library
Starter template to create typescript library.
## Features
We've already taken care of the configuration so you can dive straight into building your dream library.
- **ESLint**: Auto fix for formatting with [@antfu/eslint-config](https://github.com/antfu/eslint-config).
- **Commitlint**: Commit message conventions.
- **Jest**: Unit testing.
- **Bumpp**: Version management.
- **Output**: CommonJS and ESM.## Getting started
1. Create new repository by clicking [Use this template](https://github.com/new?template_name=ts-starter-library&template_owner=ngekoding).
2. Complete creating repository based on the library that will you build like name and description.
3. Clone the repository to your computer.
4. Open and modify `package.json` to fit your library: name, description, author, etc.
> Make sure the library `name` is available on NPM registry. Check it by opening [npmjs.com](https://npmjs.com) and search for the library `name`, and if there is no package found, so it is available to use._The repository name and description is mostly the same as what we use in the package.json, so you can check the availability when creating the repository._
5. Start building your library
## Publishing
Before publishing the library, it is good to make sure the library running well by making a test. You can found the example in `test` directory.
Publishing to NPM registry needing an account, so if you don't have an account yet, visit the [NPM sign up](https://www.npmjs.com/signup) to create one.
1. Login
Open terminal and run the npm login command.
```sh
npm login
```Complete the login process as prompted.
2. Publishing
```sh
npm run release
```You will prompted to choose the library version. It is good to follow the [semantic versioning](https://docs.npmjs.com/about-semantic-versioning).
If all goes well, you will get a message telling that the library is successfully published to the NPM registry.
### Further more
What we do above is creating unscoped public packages like many general NPM packages. Then you can found detailed about this topic in [Contributing packages to the registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
## License
[MIT](./LICENSE) License © 2024-PRESENT [Nur Muhammad](https://github.com/ngekoding)