{"id":13850289,"url":"https://github.com/lukeed/typescript-module","last_synced_at":"2025-10-30T09:21:02.244Z","repository":{"id":66007914,"uuid":"278196283","full_name":"lukeed/typescript-module","owner":"lukeed","description":"Template repository for authoring npm modules via TypeScript","archived":false,"fork":false,"pushed_at":"2024-09-27T08:10:20.000Z","size":10,"stargazers_count":147,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-12T21:37:40.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lukeed.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2020-07-08T21:17:26.000Z","updated_at":"2025-02-19T15:42:52.000Z","dependencies_parsed_at":"2024-01-13T17:12:02.945Z","dependency_job_id":"beabafc5-f1f4-4d04-b1f7-7286349b0cbb","html_url":"https://github.com/lukeed/typescript-module","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/lukeed/typescript-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Ftypescript-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Ftypescript-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Ftypescript-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Ftypescript-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeed","download_url":"https://codeload.github.com/lukeed/typescript-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Ftypescript-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001940,"owners_count":26083226,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-04T20:01:05.518Z","updated_at":"2025-10-09T18:24:53.992Z","avatar_url":"https://github.com/lukeed.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Template: TypeScript Module [![CI](https://github.com/lukeed/typescript-module/workflows/CI/badge.svg)](https://github.com/lukeed/typescript-module/actions) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/typescript-module)](https://codecov.io/gh/lukeed/typescript-module)\n\nThis is a [clonable template repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template) for authoring a `npm` module with TypeScript. Out of the box, it:\n\n* Provides minimally-viable `tsconfig.json` settings\n* Scaffolds a silly arithmetic module (`src/index.ts`)\n* Scaffolds test suites for full test coverage (`test/index.ts`)\n* Scaffolds a GitHub Action for Code Integration (CI) that:\n  * checks if compilation is successful\n  * runs the test suite(s)\n  * reports test coverage\n* Generates type definitions (`types/*.d.ts`)\n* Generates multiple distribution formats:\n  * ES Module (`dist/index.mjs`)\n  * CommonJS (`dist/index.js`)\n  * UMD (`dist/index.min.js`)\n\nAll configuration is accessible via the `rollup.config.js` and a few `package.json` keys:\n\n* `name` \u0026mdash; the name of your module\n* `main` \u0026mdash; the destination file for your CommonJS build\n* `module` \u0026mdash; the destination file for your ESM build (optional but recommended)\n* `unpkg` \u0026mdash; the destination file for your UMD build (optional for [unpkg.com](https://unpkg.com/))\n* `umd:name` \u0026mdash; the UMD global name for your module (optional)\n\n## Setup\n\n1. [Clone this template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)\n2. Replace all instances of `TODO` within the `license` and `package.json` files\n3. Create [CodeCov](https://codecov.io) account (free for OSS)\n4. Copy the provided CodeCov token as the `CODECOV_TOKEN` [repository secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets-for-a-repository) (for CI reporting)\n5. Replace `src/index.ts` and `test/index.ts` with your own code! 🎉\n\n## Commands\n\n### build\n\nBuilds your module for distribution in multiple formats (ESM, CommonJS, and UMD).\n\n```sh\n$ npm run build\n```\n\n### test\n\nRuns your test suite(s) (`/tests/**`) against your source code (`/src/**`).\u003cbr\u003eDoing so allows for accurate code coverage.\n\n\u003e **Note:** Coverage is only collected and reported through the \"CI\" Github Action (`.github/workflows/ci.yml`).\n\n```sh\n$ npm test\n```\n\n## Publishing\n\n\u003e **Important:** Please finish [Setup](#setup) before continuing!\n\nOnce all `TODO` notes have been updated \u0026 your new module is ready to be shared, all that's left to do is decide its new version \u0026mdash; AKA, do the changes consitute a `patch`, `minor`, or `major` release?\n\nOnce decided, you can run the following:\n\n```sh\n$ npm version \u003cpatch|minor|major\u003e \u0026\u0026 git push origin master --tags \u0026\u0026 npm publish\n# Example:\n# npm version patch \u0026\u0026 git push origin master --tags \u0026\u0026 npm publish\n```\n\nThis command sequence will:\n* version your module, updating the `package.json` \"version\"\n* create and push a `git` tag (matching the new version) to your repository\n* build your module (via the `prepublishOnly` script)\n* publish the module to the npm registry\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Ftypescript-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeed%2Ftypescript-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Ftypescript-module/lists"}