Use Typescript in Routify Starter Template.
setup-routify-ts
supports creating projects from scratch or converting existing projects. please select according to your needs.
npx setup-routify-ts init <project-name> [routify-init-args]
-
project-name
: Your project name (will be used as the folder name). -
routify-init-args
: Some arguments will be passed tonpx @sveltech/routify init
command. See Routify Get Started.
npx setup-routify-ts init my-routify-app
npx setup-routify-ts convert [project-directory]
-
project-directory
: Path to your project folder. Default:.
(Current folder).
npx setup-routify-ts convert /home/me/my-routify-app
- Create new
tsconfig.json
file in root folder. - Add
svelte-check
script & somedevDependencies
topackage.json
. - Rename
src/main.js
tosrc/main.ts
. - Add
lang
property toscript
element insrc/App.svelte
. - Add some plugins & configurations to
scripts/base.config.js
. - Create new
extensions.json
file in.vscode
directory.
Routify repository:
Routify is a work in progress. Since v1.5 we have a stable release. But this is a relatively young project. You can expect it to evolve.
Since Routify is in the progress, a lot of changes are likely to occur. If you find an error or something that is not updated, please inform us in the Issues section or fix it yourself by creating a new Pull Request.
Tested with @sveltech/routify@v1.9.9