https://github.com/abrie/nl4
Another copilot game test
https://github.com/abrie/nl4
Last synced: 3 months ago
JSON representation
Another copilot game test
- Host: GitHub
- URL: https://github.com/abrie/nl4
- Owner: abrie
- Created: 2024-10-23T16:17:21.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-23T16:23:21.000Z (8 months ago)
- Last Synced: 2025-01-24T23:27:12.946Z (5 months ago)
- Language: HTML
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nl4
Another copilot game test## Setting up ViteJS with Yarn
To set up ViteJS for a vanilla Typescript app using Yarn, follow these steps:
1. Install Yarn if you haven't already:
```sh
npm install --global yarn
```2. Create a new project directory and navigate into it:
```sh
mkdir my-vite-app
cd my-vite-app
```3. Initialize a new Yarn project:
```sh
yarn init -y
```4. Add ViteJS and Typescript as dependencies:
```sh
yarn add vite typescript
```5. Create a `tsconfig.json` file for Typescript configuration:
```json
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"]
}
```6. Create a `vite.config.ts` file for ViteJS configuration:
```ts
import { defineConfig } from 'vite'export default defineConfig({
root: 'src',
build: {
outDir: '../dist'
}
})
```7. Create a `src` directory and add an `index.html` file:
```html
Vite App
```8. Add a `main.ts` file in the `src` directory:
```ts
console.log('Hello Vite with Typescript!')
```9. Add scripts to `package.json` for running the development server and building the project:
```json
{
"scripts": {
"dev": "vite",
"build": "vite build"
}
}
```10. Run the development server:
```sh
yarn dev
```11. Build the project:
```sh
yarn build
```