Instalation
Quick Start
You can install the package using:
npm:
npm install tscratch
yarn:
yarn add tscratch
or create a whole setup with Vite & TypeScript already integrated (recommended):
npm:
npx create-tscratch-app@latest project-name
cd project-name
npm install
yarn:
yarn dlx create-tscratch-app@latest project-name
cd project-name
yarn install
Once you’ve created a project using create-tscratch-app, you get access to
these 3 commands:
npm:
npm run dev=> Starts the development server on port5173npm run build=> Builds the production bundle insidedist/npm run preview=> Shows a preview of the project fromdist/
yarn:
yarn dev=> Starts the development server on port5173yarn build=> Builds the production bundle insidedist/yarn preview=> Shows a preview of the project fromdist/
Deployment
You can deploy TScratch projects very easily on platforms like Vercel. To deploy a project, you can follow these few steps:
- Push your source code to a Github repository
- Create a new project on Vercel
- Import your Github repository
- Click deploy
Your project is then live on a public domain, which you can share with your friends or anyone.