If you have an existing repository that you'd like to migrate to the files from this template, you can run npx create-typescript-app in it to "migrate" its tooling to this template's.
npx create-typescript-appThe transition script will:
- Uninstall any known old packages that conflict with this template's tooling
- Delete configuration files used with those old packages
- Install any packages needed for this template's tooling
- Create or rewrite configuration files for the new tooling
- Run ESLint and Prettier auto-fixers to align formatting and style to the new settings
For example, if the repository previously using Jest for testing:
eslint-plugin-jest,jest, and other Jest-related packages will be uninstalled- Any Jest config file like
jest.config.jswill be deleted @vitest/eslint-plugin,vitest, and other Vitest-related packages will be installed- A
vitest.config.tsfile will be created
You'll then need to manually go through the following two steps to set up tooling on GitHub:
- Create one token in repository secrets (unless you chose to opt out of releases):
ACCESS_TOKEN: A GitHub PAT with repo and workflow permissions
- Install two GitHub apps:
Your repository will then have an approximate copy of this template's tooling ready for you to review! Hooray! 🥳
Warning
Migration will override many files in your repository. You'll want to review each of the changes. There will almost certainly be some incorrect changes you'll need to fix.
You can customize which pieces of tooling are provided and the options they're created with. See CLI.md.
For example, skipping the "This package was templated with..." block:
npx create-typescript-app --exclude-templated-withSee Blocks.md for details on the tooling pieces and which presets they're included in.