-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add vue-ts vue3-ts template #650
Merged
danilowoz
merged 6 commits into
codesandbox:main
from
jerrywu001:feat/vue-typescript-template
Dec 12, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8125320
feat: add vue-ts vue3-ts template
b5367f3
feat: add vue-ts vue3-ts template
81d9be8
feat: update vue vue-ts template
jerrywu001 c7f1cea
Merge branch 'main' of github.com:codesandbox/sandpack into feat/vue-…
f11c3c8
Merge branch 'feat/vue-typescript-template' of github.com:jerrywu001/…
53e4577
feat: remove vue-ts template
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/** | ||
* @hidden | ||
*/ | ||
export const VUE_TS_TEMPLATE_3 = { | ||
files: { | ||
"/src/App.vue": { | ||
code: `<template> | ||
<h1>Hello {{ msg }}</h1> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
|
||
const msg = ref<string>('World'); | ||
</script>`, | ||
}, | ||
"/src/main.ts": { | ||
code: `import { createApp } from 'vue' | ||
import App from './App.vue' | ||
createApp(App).mount('#app') | ||
`, | ||
}, | ||
"/src/shims-vue.d.ts": `/* eslint-disable */ | ||
declare module "*.vue" { | ||
import type { DefineComponent } from "vue"; | ||
const component: DefineComponent<{}, {}, any>; | ||
export default component; | ||
}`, | ||
"/public/index.html": { | ||
code: `<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> | ||
<title>codesandbox</title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong | ||
>We're sorry but codesandbox doesn't work properly without JavaScript | ||
enabled. Please enable it to continue.</strong | ||
> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> | ||
`, | ||
}, | ||
"/package.json": { | ||
code: JSON.stringify({ | ||
name: "vue3-ts", | ||
version: "0.1.0", | ||
private: true, | ||
main: "/src/main.ts", | ||
scripts: { | ||
serve: "vue-cli-service serve", | ||
build: "vue-cli-service build", | ||
}, | ||
dependencies: { | ||
"core-js": "^3.26.1", | ||
vue: "^3.2.45", | ||
}, | ||
devDependencies: { | ||
"@vue/cli-plugin-babel": "^5.0.8", | ||
"@vue/cli-plugin-typescript": "^5.0.8", | ||
"@vue/cli-service": "^5.0.8", | ||
typescript: "^4.9.3", | ||
}, | ||
}), | ||
}, | ||
"/tsconfig.json": { | ||
code: JSON.stringify({ | ||
compilerOptions: { | ||
target: "esnext", | ||
module: "esnext", | ||
strict: true, | ||
jsx: "preserve", | ||
moduleResolution: "node", | ||
experimentalDecorators: true, | ||
skipLibCheck: true, | ||
esModuleInterop: true, | ||
allowSyntheticDefaultImports: true, | ||
forceConsistentCasingInFileNames: true, | ||
useDefineForClassFields: true, | ||
sourceMap: false, | ||
baseUrl: ".", | ||
types: ["webpack-env"], | ||
paths: { | ||
"@/*": ["src/*"], | ||
}, | ||
lib: ["esnext", "dom", "dom.iterable", "scripthost"], | ||
}, | ||
include: [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"tests/**/*.ts", | ||
"tests/**/*.tsx", | ||
], | ||
exclude: ["node_modules"], | ||
}), | ||
}, | ||
}, | ||
main: "/src/App.vue", | ||
environment: "vue-cli", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a line break between
template
andscript
?