{"id":15391311,"url":"https://github.com/rtivital/ts-package-template","last_synced_at":"2025-07-30T14:39:29.087Z","repository":{"id":204137216,"uuid":"710697630","full_name":"rtivital/ts-package-template","owner":"rtivital","description":"A template to create npm packages with TypeScript","archived":false,"fork":false,"pushed_at":"2024-11-21T10:52:12.000Z","size":3714,"stargazers_count":40,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T18:12:39.306Z","etag":null,"topics":["boilerplate","template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtivital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-27T08:45:47.000Z","updated_at":"2024-12-22T19:07:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f45e7af-caad-47d1-8656-5aada9396d11","html_url":"https://github.com/rtivital/ts-package-template","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"748d3fe76cbec825afb50d6e71a34d746a4d87ab"},"previous_names":["rtivital/ts-package-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtivital%2Fts-package-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtivital%2Fts-package-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtivital%2Fts-package-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtivital%2Fts-package-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtivital","download_url":"https://codeload.github.com/rtivital/ts-package-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233647827,"owners_count":18708162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","template","typescript"],"created_at":"2024-10-01T15:10:42.838Z","updated_at":"2025-01-12T18:40:25.061Z","avatar_url":"https://github.com/rtivital.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ts-package-template\n\nA template to publish a TypeScript package to npm.\n\nIncluded tools:\n\n- Yarn v4\n- Rollup\n- esbuild\n- jest\n- prettier\n- ESLint\n- GitHub workflow for tests\n\n## Usage\n\n- Click \"Use this template\" button to create a new repository from this template\n- Clone the new repository\n- Change `package.json` to your own package name, description, etc. **!important**: change `repository.url` and other repository links to your own repository url\n- Install dependencies: `yarn` (other package managers are not supported)\n- Write your code in `src/` directory\n- Run `npm run release` to build and publish your package to npm\n\n## Publishing to npm\n\nUse `release` script to publish the package:\n\n- `npm run release` – release a new patch version to npm\n- `npm run release minor` – release a new minor version to npm\n- `npm run release major` – release a new major version to npm\n- `npm run release minor -- --stage alpha` – release a new minor alpha version to npm (for example, `1.1.0-alpha.0`)\n\nNote that release script will always publish public packages to npm. If you want to publish a private package, change release script in `scripts/release.ts`.\n\n## Publishing with GitHub Actions\n\n1. Create [npm authentication token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) and add it as `NPM_TOKEN` to your repository secrets (Settings -\u003e Secrets and variables -\u003e Actions -\u003e New repository secret).\n\n2. Create `.github/workflows/publish.yml` with the following content. _Note that if your default branch is main, you should change it in the publish action_.\n\n```yaml\non:\n  push:\n    branches: master\n\njobs:\n  publish:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v3\n        with:\n          node-version-file: '.nvmrc'\n          cache: 'yarn'\n          cache-dependency-path: '**/yarn.lock'\n      - run: yarn\n      - run: npm test\n      - uses: JS-DevTools/npm-publish@v3\n        with:\n          token: ${{ secrets.NPM_TOKEN }}\n```\n\n3. To create a new release, use commands from the previous section but with `--no-publish` flag, for example: `npm run release minor -- --no-publish`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtivital%2Fts-package-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtivital%2Fts-package-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtivital%2Fts-package-template/lists"}