Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metonym/template-lib
Template for developing libraries in TypeScript and publishing to npm
https://github.com/metonym/template-lib
library npm template typescript
Last synced: about 1 month ago
JSON representation
Template for developing libraries in TypeScript and publishing to npm
- Host: GitHub
- URL: https://github.com/metonym/template-lib
- Owner: metonym
- License: mit
- Created: 2019-07-09T00:19:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T09:02:13.000Z (over 2 years ago)
- Last Synced: 2023-03-02T20:06:28.452Z (over 1 year ago)
- Topics: library, npm, template, typescript
- Language: TypeScript
- Homepage:
- Size: 338 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# template-lib
[![Build][build]][build-badge]
> Template for developing libraries in TypeScript and publishing to [npm](https://www.npmjs.com/).
## Getting Started
Scaffold a new project using npx and degit:
```bash
npx degit metonym/template-lib template-lib
cd template-lib
yarn
```## Available Scripts
### `yarn test`
Runs test using [Jest](https://jestjs.io/) and generates a code coverage report.
### `yarn test:tdd`
Runs tests in "Test-driven Development Mode."
## Publishing to NPM
You must create an NPM account before publishing packages on the NPM registry.
In [package.json](package.json), customize the following metadata before publishing to NPM.
```json
{
"repository": {
"type": "git",
"url": "https://github.com/{USER-NAME}/{REPO-NAME}.git"
},
"homepage": "https://github.com/{USER-NAME}/{REPO-NAME}",
"keywords": ["..."],
"bugs": "https://github.com/{USER-NAME}/{REPO-NAME}/issues"
}
```### `yarn publish`
Runs the `prepack` command, which first builds the project for production before publishing the library.
## License
[MIT](LICENSE)
[build]: https://travis-ci.com/metonym/template-lib.svg?branch=master
[build-badge]: https://travis-ci.com/metonym/template-lib