Skip to content

Commit 057df57

Browse files
committed
init
0 parents  commit 057df57

17 files changed

+6960
-0
lines changed

.browserslistrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
> 1%
2+
last 2 versions
3+
not dead
4+
not ie 11

.eslintrc.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:vue/vue3-essential',
8+
'eslint:recommended',
9+
'@vue/typescript/recommended'
10+
],
11+
parserOptions: {
12+
ecmaVersion: 2020
13+
},
14+
rules: {
15+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
17+
}
18+
}

.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+
# vuex-typed
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

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "vuex-typed",
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.8.3",
12+
"vue": "^3.2.6",
13+
"vuex": "^4.0.0"
14+
},
15+
"devDependencies": {
16+
"@typescript-eslint/eslint-plugin": "^4.15.1",
17+
"@typescript-eslint/parser": "^4.15.1",
18+
"@vue/cli-plugin-babel": "~5.0.0",
19+
"@vue/cli-plugin-eslint": "~5.0.0",
20+
"@vue/cli-plugin-typescript": "~5.0.0",
21+
"@vue/cli-plugin-vuex": "~5.0.0",
22+
"@vue/cli-service": "~5.0.0",
23+
"@vue/compiler-sfc": "^3.2.6",
24+
"@vue/eslint-config-typescript": "^7.0.0",
25+
"eslint": "^7.20.0",
26+
"eslint-plugin-vue": "^7.2.0",
27+
"typescript": "~4.1.5"
28+
}
29+
}

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

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<img alt="Vue logo" src="./assets/logo.png">
3+
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/>
4+
</template>
5+
6+
<script lang="ts">
7+
import { defineComponent } from 'vue';
8+
import HelloWorld from './components/HelloWorld.vue';
9+
10+
export default defineComponent({
11+
name: 'App',
12+
components: {
13+
HelloWorld
14+
}
15+
});
16+
</script>
17+
18+
<style>
19+
#app {
20+
font-family: Avenir, Helvetica, Arial, sans-serif;
21+
-webkit-font-smoothing: antialiased;
22+
-moz-osx-font-smoothing: grayscale;
23+
text-align: center;
24+
color: #2c3e50;
25+
margin-top: 60px;
26+
}
27+
</style>

src/assets/logo.png

6.69 KB
Loading

src/components/HelloWorld.vue

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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-babel" target="_blank" rel="noopener">babel</a></li>
12+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-typescript" target="_blank" rel="noopener">typescript</a></li>
13+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
14+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
15+
</ul>
16+
<h3>Essential Links</h3>
17+
<ul>
18+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
19+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
20+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
21+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
22+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
23+
</ul>
24+
<h3>Ecosystem</h3>
25+
<ul>
26+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
27+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
28+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
29+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
30+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
31+
</ul>
32+
</div>
33+
</template>
34+
35+
<script lang="ts">
36+
import { defineComponent } from 'vue';
37+
38+
export default defineComponent({
39+
name: 'HelloWorld',
40+
props: {
41+
msg: String,
42+
},
43+
});
44+
</script>
45+
46+
<!-- Add "scoped" attribute to limit CSS to this component only -->
47+
<style scoped>
48+
h3 {
49+
margin: 40px 0 0;
50+
}
51+
ul {
52+
list-style-type: none;
53+
padding: 0;
54+
}
55+
li {
56+
display: inline-block;
57+
margin: 0 10px;
58+
}
59+
a {
60+
color: #42b983;
61+
}
62+
</style>

src/main.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createApp } from 'vue'
2+
import App from './App.vue'
3+
import store from './store'
4+
5+
createApp(App).use(store).mount('#app')

src/shims-vue.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* eslint-disable */
2+
declare module '*.vue' {
3+
import type { DefineComponent } from 'vue'
4+
const component: DefineComponent<{}, {}, any>
5+
export default component
6+
}

src/store/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { createStore } from 'vuex'
2+
3+
export default createStore({
4+
state: {
5+
},
6+
mutations: {
7+
},
8+
actions: {
9+
},
10+
modules: {
11+
}
12+
})

tsconfig.json

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

vue.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
transpileDependencies: true
3+
}

0 commit comments

Comments
 (0)