setup-routify-ts
v1.0.0-pre.4
Published
Use Typescript in Routify Starter Template.
Downloads
5
Maintainers
Readme
setup-routify-ts (Unofficial)
Use Typescript in Routify Starter Template.
Usage
setup-routify-ts
supports creating projects from scratch or converting existing projects. please select according to your needs.
Method 1: Create new Routify Starter Template
Command
npx setup-routify-ts init <project-name> [routify-init-args]
Arguments
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.
Example
npx setup-routify-ts init my-routify-app
Method 2: Convert existing projects to Typescript
Command
npx setup-routify-ts convert [project-directory]
Arguments
project-directory
: Path to your project folder. Default:.
(Current folder).
Example
npx setup-routify-ts convert /home/me/my-routify-app
What we do
- 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.
Note
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/[email protected]