Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/create-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ npm init @vitejs/app my-vue-app --template vue
Currently supported template presets include:

- `vanilla`
- `vanilla-ts`
- `vue`
- `vue-ts`
- `react`
Expand Down
1 change: 1 addition & 0 deletions packages/create-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const cwd = process.cwd()

const TEMPLATES = [
yellow('vanilla'),
yellow('vanilla-ts'),
green('vue'),
green('vue-ts'),
cyan('react'),
Expand Down
5 changes: 5 additions & 0 deletions packages/create-app/template-vanilla-ts/_gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
15 changes: 15 additions & 0 deletions packages/create-app/template-vanilla-ts/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions packages/create-app/template-vanilla-ts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions packages/create-app/template-vanilla-ts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "vite-typescript-starter",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"devDependencies": {
"vite": "^2.0.0-beta.69"
Comment thread
antfu marked this conversation as resolved.
Outdated
}
}
8 changes: 8 additions & 0 deletions packages/create-app/template-vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import './style.css'

const app = document.querySelector('#app') as HTMLDivElement

app.innerHTML = `
<h1>Hello Vite!</h1>
<a href="https://vitejs.dev/guide/features.html" target="_blank">Documentation</a>
`
Comment thread
antfu marked this conversation as resolved.
Outdated
8 changes: 8 additions & 0 deletions packages/create-app/template-vanilla-ts/src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
Comment thread
antfu marked this conversation as resolved.
Outdated
17 changes: 17 additions & 0 deletions packages/create-app/template-vanilla-ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"types": ["vite/client"],
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true
},
"include": ["./src"]
}