Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reconbot/typescript-library-template
Rollup your code and types for publishing
https://github.com/reconbot/typescript-library-template
Last synced: 6 days ago
JSON representation
Rollup your code and types for publishing
- Host: GitHub
- URL: https://github.com/reconbot/typescript-library-template
- Owner: reconbot
- License: mit
- Created: 2019-08-18T17:23:21.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T22:43:18.000Z (15 days ago)
- Last Synced: 2024-10-30T00:46:38.824Z (15 days ago)
- Language: JavaScript
- Homepage:
- Size: 2.01 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typescript Library Template
[![Release](https://github.com/reconbot/typescript-library-template/actions/workflows/test.yml/badge.svg)](https://github.com/reconbot/typescript-library-template/actions/workflows/test.yml)
This is an example project for shipping typescript using the rules layed out by [@southpolesteve](https://twitter.com/southpolesteve) in his ["Shipping Typescript to NPM"](https://speakerdeck.com/southpolesteve/shipping-typescript-to-npm?slide=10) talk that he gave at NYC typescript.
It gives you a library in CommonJS and ESM that's rolled up with rollup and includes rolled up types. It makes most javascript users and me very happy.
Also includes eslint, node:test, semantic-release and github actions. Now updated to include the exports directive in the package.json.
## Guide
- Set the repo secret `NPM_TOKEN` before your first push so that you can publish to npm.
- Change all references in package.json and bundle-types.mjs to your own project name
- If you want external dependencies, add them to the `external` section in the `rollup.config.js` otherwise they will be bundled in the library.