Skip to content

Commit 3d0724c

Browse files
committed
init
0 parents  commit 3d0724c

21 files changed

+10708
-0
lines changed

.browserslistrc

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

.eslintrc.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: [
7+
"plugin:vue/essential",
8+
"eslint:recommended",
9+
"@vue/typescript/recommended",
10+
"@vue/prettier",
11+
"@vue/prettier/@typescript-eslint"
12+
],
13+
parserOptions: {
14+
ecmaVersion: 2020
15+
},
16+
rules: {
17+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
18+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
19+
},
20+
overrides: [
21+
{
22+
files: [
23+
"**/__tests__/*.{j,t}s?(x)",
24+
"**/tests/unit/**/*.spec.{j,t}s?(x)"
25+
],
26+
env: {
27+
jest: true
28+
}
29+
}
30+
]
31+
};

.gitignore

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

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# hennge
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+
### Run your unit tests
19+
```
20+
yarn test:unit
21+
```
22+
23+
### Lints and fixes files
24+
```
25+
yarn lint
26+
```
27+
28+
### Customize configuration
29+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

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

jest.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel"
3+
};

package.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "hennge",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"test:unit": "vue-cli-service test:unit",
9+
"lint": "vue-cli-service lint"
10+
},
11+
"dependencies": {
12+
"core-js": "^3.6.4",
13+
"vue": "^2.6.11",
14+
"vue-class-component": "^7.2.3",
15+
"vue-property-decorator": "^8.4.1",
16+
"vue-router": "^3.1.6"
17+
},
18+
"devDependencies": {
19+
"@types/jest": "^24.0.19",
20+
"@typescript-eslint/eslint-plugin": "^2.26.0",
21+
"@typescript-eslint/parser": "^2.26.0",
22+
"@vue/cli-plugin-babel": "~4.3.0",
23+
"@vue/cli-plugin-eslint": "~4.3.0",
24+
"@vue/cli-plugin-router": "~4.3.0",
25+
"@vue/cli-plugin-typescript": "~4.3.0",
26+
"@vue/cli-plugin-unit-jest": "~4.3.0",
27+
"@vue/cli-service": "~4.3.0",
28+
"@vue/eslint-config-prettier": "^6.0.0",
29+
"@vue/eslint-config-typescript": "^5.0.2",
30+
"@vue/test-utils": "1.0.0-beta.31",
31+
"eslint": "^6.7.2",
32+
"eslint-plugin-prettier": "^3.1.1",
33+
"eslint-plugin-vue": "^6.2.2",
34+
"prettier": "^1.19.1",
35+
"typescript": "~3.8.3",
36+
"vue-template-compiler": "^2.6.11"
37+
}
38+
}

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="en">
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

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<template>
2+
<div id="app">
3+
<div id="nav">
4+
<router-link to="/">Home</router-link> |
5+
<router-link to="/about">About</router-link>
6+
</div>
7+
<router-view />
8+
</div>
9+
</template>
10+
11+
<style>
12+
#app {
13+
font-family: Avenir, Helvetica, Arial, sans-serif;
14+
-webkit-font-smoothing: antialiased;
15+
-moz-osx-font-smoothing: grayscale;
16+
text-align: center;
17+
color: #2c3e50;
18+
}
19+
20+
#nav {
21+
padding: 30px;
22+
}
23+
24+
#nav a {
25+
font-weight: bold;
26+
color: #2c3e50;
27+
}
28+
29+
#nav a.router-link-exact-active {
30+
color: #42b983;
31+
}
32+
</style>

src/assets/logo.png

6.69 KB
Loading

src/components/HelloWorld.vue

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
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"
8+
>vue-cli documentation</a
9+
>.
10+
</p>
11+
<h3>Installed CLI Plugins</h3>
12+
<ul>
13+
<li>
14+
<a
15+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel"
16+
target="_blank"
17+
rel="noopener"
18+
>babel</a
19+
>
20+
</li>
21+
<li>
22+
<a
23+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-typescript"
24+
target="_blank"
25+
rel="noopener"
26+
>typescript</a
27+
>
28+
</li>
29+
<li>
30+
<a
31+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router"
32+
target="_blank"
33+
rel="noopener"
34+
>router</a
35+
>
36+
</li>
37+
<li>
38+
<a
39+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint"
40+
target="_blank"
41+
rel="noopener"
42+
>eslint</a
43+
>
44+
</li>
45+
<li>
46+
<a
47+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-jest"
48+
target="_blank"
49+
rel="noopener"
50+
>unit-jest</a
51+
>
52+
</li>
53+
</ul>
54+
<h3>Essential Links</h3>
55+
<ul>
56+
<li>
57+
<a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a>
58+
</li>
59+
<li>
60+
<a href="https://forum.vuejs.org" target="_blank" rel="noopener"
61+
>Forum</a
62+
>
63+
</li>
64+
<li>
65+
<a href="https://chat.vuejs.org" target="_blank" rel="noopener"
66+
>Community Chat</a
67+
>
68+
</li>
69+
<li>
70+
<a href="https://twitter.com/vuejs" target="_blank" rel="noopener"
71+
>Twitter</a
72+
>
73+
</li>
74+
<li>
75+
<a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a>
76+
</li>
77+
</ul>
78+
<h3>Ecosystem</h3>
79+
<ul>
80+
<li>
81+
<a href="https://router.vuejs.org" target="_blank" rel="noopener"
82+
>vue-router</a
83+
>
84+
</li>
85+
<li>
86+
<a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a>
87+
</li>
88+
<li>
89+
<a
90+
href="https://github.com/vuejs/vue-devtools#vue-devtools"
91+
target="_blank"
92+
rel="noopener"
93+
>vue-devtools</a
94+
>
95+
</li>
96+
<li>
97+
<a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener"
98+
>vue-loader</a
99+
>
100+
</li>
101+
<li>
102+
<a
103+
href="https://github.com/vuejs/awesome-vue"
104+
target="_blank"
105+
rel="noopener"
106+
>awesome-vue</a
107+
>
108+
</li>
109+
</ul>
110+
</div>
111+
</template>
112+
113+
<script lang="ts">
114+
import { Component, Prop, Vue } from "vue-property-decorator";
115+
116+
@Component
117+
export default class HelloWorld extends Vue {
118+
@Prop() private msg!: string;
119+
}
120+
</script>
121+
122+
<!-- Add "scoped" attribute to limit CSS to this component only -->
123+
<style scoped>
124+
h3 {
125+
margin: 40px 0 0;
126+
}
127+
ul {
128+
list-style-type: none;
129+
padding: 0;
130+
}
131+
li {
132+
display: inline-block;
133+
margin: 0 10px;
134+
}
135+
a {
136+
color: #42b983;
137+
}
138+
</style>

src/main.ts

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

src/router/index.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import Vue from "vue";
2+
import VueRouter, { RouteConfig } from "vue-router";
3+
import Home from "../views/Home.vue";
4+
5+
Vue.use(VueRouter);
6+
7+
const routes: Array<RouteConfig> = [
8+
{
9+
path: "/",
10+
name: "Home",
11+
component: Home
12+
},
13+
{
14+
path: "/about",
15+
name: "About",
16+
// route level code-splitting
17+
// this generates a separate chunk (about.[hash].js) for this route
18+
// which is lazy-loaded when the route is visited.
19+
component: () =>
20+
import(/* webpackChunkName: "about" */ "../views/About.vue")
21+
}
22+
];
23+
24+
const router = new VueRouter({
25+
routes
26+
});
27+
28+
export default router;

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+
}

src/views/About.vue

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div class="about">
3+
<h1>This is an about page</h1>
4+
</div>
5+
</template>

0 commit comments

Comments
 (0)