{"id":22796279,"url":"https://github.com/makerxstudio/ts-toolkit","last_synced_at":"2025-04-19T13:13:30.651Z","repository":{"id":182215829,"uuid":"531786911","full_name":"MakerXStudio/ts-toolkit","owner":"MakerXStudio","description":"A simple cli utility to assist in standardising several boilerplate files across our typescript repositories","archived":false,"fork":false,"pushed_at":"2025-04-07T15:19:32.000Z","size":601,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-07T15:37:13.122Z","etag":null,"topics":["cli","npm","package","typescript","utils"],"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/MakerXStudio.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}},"created_at":"2022-09-02T04:58:37.000Z","updated_at":"2025-03-31T19:41:46.000Z","dependencies_parsed_at":"2024-02-20T18:44:08.061Z","dependency_job_id":"ec5830ab-e4ff-449f-854c-65c702b5f211","html_url":"https://github.com/MakerXStudio/ts-toolkit","commit_stats":null,"previous_names":["makerxstudio/ts-toolkit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fts-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fts-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fts-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fts-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MakerXStudio","download_url":"https://codeload.github.com/MakerXStudio/ts-toolkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249701679,"owners_count":21312758,"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":["cli","npm","package","typescript","utils"],"created_at":"2024-12-12T05:11:46.943Z","updated_at":"2025-04-19T13:13:30.645Z","avatar_url":"https://github.com/MakerXStudio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @makerx/ts-toolkit\n\nA simple cli utility to assist in standardising several boilerplate files across our typescript repositories.\n\nThe files it concerns itself with are:\n\n- .editorconfig\n- .eslintignore\n- .eslintrc\n- .gitattributes\n- .gitignore\n- .prettierrc.js\n- .prettierignore\n- tsconfig.json\n\nThe cli will output a starter version of these files which can then be extended to suit an individual project's needs. Where possible these files extend a base configuration file in a separate package (eg `@makerx/eslint-config` or `@makerx/prettier-config`). These packages may evolve over time and the latest can be obtained via npm (eg. `npm i -D @makerx/eslint-config@latest`)\n\nIt is recommended you commit all pending changes before running the cli so that you can compare and / or reset changes\n\n## Usage\n\n```shell\nnpx @makerx/ts-toolkit init --existing-file-behaviour \u003csample|overwrite|skip\u003e --platform \u003cnode\u003e --no-scripts\n```\n\n## Options\n\n### Existing file behaviour (`--existing-file-behaviour` or `-efb`)\n\nThis option dictates how existing files are handled. The default value is sample\n\n- sample - If a file already exists, write an additional \u003cfilename\u003e.sample file\n- overwrite - If a file already exists, overwrite it\n- skip - If a file already exists, skip it\n\n### Platform (`--platform` or `-p`)\n\nNot used yet, but will be used to output platform specific files. The default value is node\n\n### No Scripts (`--no-scripts` or `-ns`)\n\nIf provided, cli will skip adding any scripts to your package.json\n\n### No Install (`--no-install` or `-ni`)\n\nAfter adding new packages to your package.json, Toolkit will run `npm install` to install this packages. Passing in this parameter will disable that behaviour.\n\n## copy-package-json\n\nThe ts-toolkit also includes a utility for copying your `package.json` file into a `dist` directory without superfluous sections like `devDependencies` and `scripts`. It will also replace key sections based on the arguments passed in\n\nThe basic version takes several arguments which detail explicit values for what is to be replaced\n\n```shell\n# e.g. with defaults:\ntstk copy-package-json\n# or with all args:\ntstk copy-package-json --input-folder ./subfolder --output-folder ./dist/subfolder --main 'app.js' --types 'app.d.ts' --custom-sections extraSection1 extraSection2\n```\n\nAn alternative option has been added in v4 which takes its arguments from a configuration file. ts-toolkit uses [cosmiconfig](https://github.com/cosmiconfig/cosmiconfig) so any of the compatible formats of cosmiconfig are supported. The recommended approach is to use a typescript file though as it will give you intellisense\n\n\u003e \u003e \u003e This feature is very experimental at this stage and may not work as expected for atypical scenarios (ie. ones which do not match this repo)\n\n```ts\n/* Sample .tstoolkitrc.ts */\nimport { TsToolkitConfig } from '@makerx/ts-toolkit'\n\nconst config: TsToolkitConfig = {\n  packageConfig: {\n    srcDir: 'src',\n    outDir: 'dist',\n    moduleType: 'module',\n    main: 'index.ts',\n    bin: {\n      '@makerx/ts-toolkit': 'bin/run-cli.ts',\n      tstk: 'bin/run-cli.ts',\n    },\n  },\n}\nexport default config\n```\n\nFile paths used in this config file should point to the typescript file relative to the source directory. The tool will translate this to relevant js/mjs/d.ts paths in the out directory.\n\n## Sub-Packages\n\n### @makerx/eslint-config\n\nA set of default eslint plugins and rules\n\n### @makerx/prettier-config\n\nA default prettier configuration\n\n### @makerx/ts-config\n\nA default tsconfig configuration\n\n## Contributing\n\n### Releasing\n\nReleases are set up to push a new version of each package when the version number is changed. If you don't change the version number, that package will not be re-published\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerxstudio%2Fts-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerxstudio%2Fts-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerxstudio%2Fts-toolkit/lists"}