A React TypeScript website built with Vite for the OpenKotOR community.
- Node.js (v16 or higher)
- npm
npm installnpm run devStarts the Vite development server at http://localhost:3000
npm run buildBuilds the project and outputs to the dist folder.
npm run serveBuilds the project and serves the dist folder using live-server at http://localhost:3000
npm run type-checkRuns TypeScript type checking without building.
The project is configured to work with VS Code Live Server extension:
-
VS Code Settings: The
.vscode/settings.jsonfile configures Live Server to:- Use the
distfolder as the root directory - Run on port 3000
- Auto-open the browser
- Ignore source files and development dependencies
- Use the
-
Usage:
- Build the project:
npm run build - Right-click on
dist/index.htmlin VS Code - Select "Open with Live Server"
- Build the project:
├── dist/ # Built files (served by Live Server)
│ ├── index.html # Main HTML file
│ └── assets/ # CSS, JS, and other assets
├── src/ # Source files
│ ├── App.tsx # Main React component
│ ├── index.tsx # React entry point
│ └── app.scss # Styles
├── .vscode/ # VS Code configuration
│ └── settings.json # Live Server settings
├── package.json # Dependencies and scripts
├── vite.config.ts # Vite configuration
└── tsconfig.json # TypeScript configuration
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run serve- Build and serve with live-servernpm run type-check- Type checking only