{"id":18821370,"url":"https://github.com/borderless/ts-scripts","last_synced_at":"2025-06-12T04:35:44.297Z","repository":{"id":54163938,"uuid":"338739447","full_name":"borderless/ts-scripts","owner":"borderless","description":"Simple, mostly opinionated, scripts to build TypeScript modules","archived":false,"fork":false,"pushed_at":"2023-12-12T06:38:05.000Z","size":753,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-14T07:52:02.734Z","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/borderless.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-14T05:54:02.000Z","updated_at":"2024-09-22T22:56:53.000Z","dependencies_parsed_at":"2024-06-18T23:09:49.813Z","dependency_job_id":null,"html_url":"https://github.com/borderless/ts-scripts","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/borderless/ts-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borderless%2Fts-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borderless%2Fts-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borderless%2Fts-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borderless%2Fts-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borderless","download_url":"https://codeload.github.com/borderless/ts-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borderless%2Fts-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259398659,"owners_count":22851476,"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":[],"created_at":"2024-11-08T00:39:47.289Z","updated_at":"2025-06-12T04:35:44.272Z","avatar_url":"https://github.com/borderless.png","language":"TypeScript","readme":"# TS Scripts\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Node build status][node-build-image]][node-build-url]\n[![Bun build status][bun-build-image]][bun-build-url]\n\n\u003e Simple, mostly opinionated, scripts to build TypeScript modules.\n\n## Installation\n\n```sh\nnpm install @borderless/ts-scripts --save-dev\n```\n\n## Usage\n\nIn your `package.json` you can use the scripts:\n\n```json\n{\n  \"scripts\": {\n    \"format\": \"ts-scripts format\",\n    \"specs\": \"ts-scripts specs\",\n    \"test\": \"ts-scripts test\", // Runs `check`, `specs --coverage`, `build`.\n    \"build\": \"ts-scripts build\",\n    \"prepublishOnly\": \"npm run build\",\n    \"prepare\": \"ts-scripts install\"\n  }\n}\n```\n\nYou will also need to install `typescript` for building and `vitest` for specs.\n\n**Note:** If using `bun`, you don't need `vitest`. You can use `bun test` instead.\n\n### Batteries Included\n\n- `install` - Installs `husky` and `lint-staged` for git commit hooks\n- `format` - Uses `prettier --write` on all supported files in `src` and the root directory\n- `specs` - Uses `vitest` to run test files match `*.{test,spec}.*` files\n  - `--watch \u003cindex\u003e` Runs vitest in watch mode on the config at `\u003cindex\u003e`\n  - `--update` Updates the snapshot files\n  - `--changed` Runs tests on only changed files\n  - `--since \u003ccommit\u003e` Runs tests on files changed since `\u003ccommit\u003e`\n  - `--test-pattern` Runs tests matching the specified pattern\n- `build` - Uses `rimraf` and `tsc`\n- `check` - Uses `prettier --check` and `tsc` on each test \"project\"\n- `test` - Runs `check`, `specs`, and `build`\n\n### Configuration\n\nConfiguration can get specified in your `package.json` file under `ts-scripts`:\n\n- `src` - An array of source file directories (default: `[\"src\"]`)\n- `ignore` - An array of patterns to ignore (default: `[]`)\n- `dist` - An array of output directories to clean before `build` (default: `[\"dist\"]`)\n- `project` An array of TSConfig files to build using TypeScript (default: `[\"tsconfig.json\"]`)\n- `checkProject` An array of TSConfig files to type check using TypeScript (default: `[\"tsconfig.json\"]`)\n- `test` An array of test configuration objects (default: `[{}]`)\n  - `dir` The directory to read tests from (default: `undefined`, root directory)\n  - `config` The configuration file to use for this test (default: `undefined`, discovered by `vitest`)\n\nSpecific configuration can be disabled for customized configuration by setting `src`, `dist`, `project`, or `test` to an empty array.\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/@borderless/ts-scripts\n[npm-url]: https://npmjs.org/package/@borderless/ts-scripts\n[downloads-image]: https://img.shields.io/npm/dm/@borderless/ts-scripts\n[downloads-url]: https://npmjs.org/package/@borderless/ts-scripts\n[node-build-image]: https://img.shields.io/github/actions/workflow/status/borderless/ts-scripts/ci-node.yml?branch=main\u0026label=node%20build\n[node-build-url]: https://github.com/borderless/ts-scripts/actions/workflows/ci-node.yml?query=branch%3Amain\n[bun-build-image]: https://img.shields.io/github/actions/workflow/status/borderless/ts-scripts/ci-bun.yml?branch=main\u0026label=bun%20build\n[bun-build-url]: https://github.com/borderless/ts-scripts/actions/workflows/ci-bun.yml?query=branch%3Amain\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborderless%2Fts-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborderless%2Fts-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborderless%2Fts-scripts/lists"}