https://github.com/jackw/ts-slurper
A PoC to understand how types can be shared across projects using an npm package and some automations
https://github.com/jackw/ts-slurper
Last synced: 11 months ago
JSON representation
A PoC to understand how types can be shared across projects using an npm package and some automations
- Host: GitHub
- URL: https://github.com/jackw/ts-slurper
- Owner: jackw
- License: apache-2.0
- Created: 2024-07-09T13:58:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-23T07:33:52.000Z (almost 2 years ago)
- Last Synced: 2025-03-12T16:46:00.304Z (about 1 year ago)
- Language: TypeScript
- Size: 247 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-slurper
A PoC to understand how types can be shared across projects using an npm package and some automations
## How does it work?
This repo consists of a script that pulls code from various other repos and places it in directories within the src. It then creates a barrel file to export everything from these "other repo type files" and finally bundles the types into a single dist/index.d.ts file. This is then used as the NPM package types input for consuming projects. This will be wired up with a workflow which on success creates a release with the dist package attached which can be downloaded and installed using your favourite node package manager...
`npm install ./path/to/tarball.tgz`
## How do I add plugins to the package?
Add a new directory to the types directory with your bundled `index.d.ts` file.
## How to publish releases
As a PoC this repo will only publish the packed package to gh releases. This is to make it easy to install from the tarball attached to a gh release.
To release a new version run `npm version ` and push with `git push origin main --follow-tags`.