Skip to content

Commit 75f186f

Browse files
committed
init
0 parents  commit 75f186f

12 files changed

+254
-0
lines changed

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
16+
# Editor directories and files
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw?

README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# reprod-vue
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
yarn lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

package.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "reprod-vue",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"core-js": "^3.6.5",
12+
"vue": "^2.7.0-beta.8"
13+
},
14+
"devDependencies": {
15+
"@typescript-eslint/eslint-plugin": "^4.18.0",
16+
"@typescript-eslint/parser": "^4.18.0",
17+
"@vue/cli-plugin-babel": "~4.5.19",
18+
"@vue/cli-plugin-eslint": "~4.5.19",
19+
"@vue/cli-plugin-typescript": "~4.5.19",
20+
"@vue/cli-service": "~4.5.19",
21+
"@vue/eslint-config-typescript": "^7.0.0",
22+
"babel-eslint": "^10.1.0",
23+
"eslint": "^6.7.2",
24+
"eslint-plugin-vue": "^6.2.2",
25+
"typescript": "~4.1.5",
26+
"vue-template-compiler": "^2.6.11"
27+
},
28+
"eslintConfig": {
29+
"root": true,
30+
"env": {
31+
"node": true
32+
},
33+
"extends": [
34+
"plugin:vue/essential",
35+
"eslint:recommended",
36+
"@vue/typescript"
37+
],
38+
"parserOptions": {
39+
"parser": "@typescript-eslint/parser"
40+
},
41+
"rules": {}
42+
},
43+
"browserslist": [
44+
"> 1%",
45+
"last 2 versions",
46+
"not dead"
47+
],
48+
"resolutions": {
49+
"vue-loader": "^15.10.0-beta.6"
50+
}
51+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

src/App.vue

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<div id="app" @click="
3+
$emit('update:a');
4+
">
5+
</div>
6+
</template>
7+
8+
<script setup lang="ts">
9+
import HelloWorld from './components/HelloWorld.vue'
10+
console.log(HelloWorld)
11+
</script>

src/components/HelloWorld.vue

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<template>
2+
<div class="hello">
3+
<h1>{{ msg }}</h1>
4+
<p>
5+
For a guide and recipes on how to configure / customize this project,<br>
6+
check out the
7+
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8+
</p>
9+
<h3>Installed CLI Plugins</h3>
10+
<ul>
11+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-typescript" target="_blank" rel="noopener">typescript</a></li>
12+
</ul>
13+
<h3>Essential Links</h3>
14+
<ul>
15+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
16+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
17+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
18+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
19+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
20+
</ul>
21+
<h3>Ecosystem</h3>
22+
<ul>
23+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
24+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
25+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
26+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
27+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
28+
</ul>
29+
</div>
30+
</template>
31+
32+
<script lang="ts">
33+
import Vue from 'vue';
34+
35+
export default Vue.extend({
36+
name: 'HelloWorld',
37+
props: {
38+
msg: String,
39+
},
40+
});
41+
</script>
42+
43+
<!-- Add "scoped" attribute to limit CSS to this component only -->
44+
<style scoped>
45+
h3 {
46+
margin: 40px 0 0;
47+
}
48+
ul {
49+
list-style-type: none;
50+
padding: 0;
51+
}
52+
li {
53+
display: inline-block;
54+
margin: 0 10px;
55+
}
56+
a {
57+
color: #42b983;
58+
}
59+
</style>

src/main.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Vue from 'vue'
2+
import App from './App.vue'
3+
4+
Vue.config.productionTip = false
5+
6+
new Vue({
7+
render: h => h(App),
8+
}).$mount('#app')

src/shims-tsx.d.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Vue, { VNode } from 'vue'
2+
3+
declare global {
4+
namespace JSX {
5+
// tslint:disable no-empty-interface
6+
interface Element extends VNode {}
7+
// tslint:disable no-empty-interface
8+
interface ElementClass extends Vue {}
9+
interface IntrinsicElements {
10+
[elem: string]: any
11+
}
12+
}
13+
}

src/shims-vue.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.vue' {
2+
import Vue from 'vue'
3+
export default Vue
4+
}

tsconfig.json

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"module": "esnext",
5+
"strict": true,
6+
"jsx": "preserve",
7+
"importHelpers": true,
8+
"moduleResolution": "node",
9+
"skipLibCheck": true,
10+
"esModuleInterop": true,
11+
"allowSyntheticDefaultImports": true,
12+
"sourceMap": true,
13+
"baseUrl": ".",
14+
"types": [
15+
"webpack-env"
16+
],
17+
"paths": {
18+
"@/*": [
19+
"src/*"
20+
]
21+
},
22+
"lib": [
23+
"esnext",
24+
"dom",
25+
"dom.iterable",
26+
"scripthost"
27+
]
28+
},
29+
"include": [
30+
"src/**/*.ts",
31+
"src/**/*.tsx",
32+
"src/**/*.vue",
33+
"tests/**/*.ts",
34+
"tests/**/*.tsx"
35+
],
36+
"exclude": [
37+
"node_modules"
38+
]
39+
}

0 commit comments

Comments
 (0)