Skip to content

Commit d21c01f

Browse files
committed
created new project using vue create
1 parent cf6d897 commit d21c01f

16 files changed

+13572
-0
lines changed

.browserslistrc

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

.eslintrc.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: ["plugin:vue/essential", "@vue/prettier"],
7+
rules: {
8+
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
10+
},
11+
parserOptions: {
12+
parser: "babel-eslint"
13+
},
14+
overrides: [
15+
{
16+
files: ["**/__tests__/*.{j,t}s?(x)"],
17+
env: {
18+
mocha: true
19+
}
20+
}
21+
]
22+
};

babel.config.js

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

package-lock.json

+13,274
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "dochunt",
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+
"test:e2e": "vue-cli-service test:e2e",
10+
"test:unit": "vue-cli-service test:unit"
11+
},
12+
"dependencies": {
13+
"core-js": "^2.6.5",
14+
"vue": "^2.6.10"
15+
},
16+
"devDependencies": {
17+
"@vue/cli-plugin-babel": "^3.11.0",
18+
"@vue/cli-plugin-e2e-nightwatch": "^3.11.0",
19+
"@vue/cli-plugin-eslint": "^3.11.0",
20+
"@vue/cli-plugin-unit-mocha": "^3.11.0",
21+
"@vue/cli-service": "^3.11.0",
22+
"@vue/eslint-config-prettier": "^5.0.0",
23+
"@vue/test-utils": "1.0.0-beta.29",
24+
"babel-eslint": "^10.0.1",
25+
"chai": "^4.1.2",
26+
"eslint": "^5.16.0",
27+
"eslint-plugin-prettier": "^3.1.0",
28+
"eslint-plugin-vue": "^5.0.0",
29+
"prettier": "^1.18.2",
30+
"vue-template-compiler": "^2.6.10"
31+
}
32+
}

postcss.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {}
4+
}
5+
};

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>dochunt</title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but dochunt 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

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

src/assets/logo.png

6.69 KB
Loading

src/components/HelloWorld.vue

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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-eslint"
24+
target="_blank"
25+
rel="noopener"
26+
>eslint</a
27+
>
28+
</li>
29+
<li>
30+
<a
31+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-mocha"
32+
target="_blank"
33+
rel="noopener"
34+
>unit-mocha</a
35+
>
36+
</li>
37+
<li>
38+
<a
39+
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-nightwatch"
40+
target="_blank"
41+
rel="noopener"
42+
>e2e-nightwatch</a
43+
>
44+
</li>
45+
</ul>
46+
<h3>Essential Links</h3>
47+
<ul>
48+
<li>
49+
<a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a>
50+
</li>
51+
<li>
52+
<a href="https://forum.vuejs.org" target="_blank" rel="noopener"
53+
>Forum</a
54+
>
55+
</li>
56+
<li>
57+
<a href="https://chat.vuejs.org" target="_blank" rel="noopener"
58+
>Community Chat</a
59+
>
60+
</li>
61+
<li>
62+
<a href="https://twitter.com/vuejs" target="_blank" rel="noopener"
63+
>Twitter</a
64+
>
65+
</li>
66+
<li>
67+
<a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a>
68+
</li>
69+
</ul>
70+
<h3>Ecosystem</h3>
71+
<ul>
72+
<li>
73+
<a href="https://router.vuejs.org" target="_blank" rel="noopener"
74+
>vue-router</a
75+
>
76+
</li>
77+
<li>
78+
<a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a>
79+
</li>
80+
<li>
81+
<a
82+
href="https://github.com/vuejs/vue-devtools#vue-devtools"
83+
target="_blank"
84+
rel="noopener"
85+
>vue-devtools</a
86+
>
87+
</li>
88+
<li>
89+
<a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener"
90+
>vue-loader</a
91+
>
92+
</li>
93+
<li>
94+
<a
95+
href="https://github.com/vuejs/awesome-vue"
96+
target="_blank"
97+
rel="noopener"
98+
>awesome-vue</a
99+
>
100+
</li>
101+
</ul>
102+
</div>
103+
</template>
104+
105+
<script>
106+
export default {
107+
name: "HelloWorld",
108+
props: {
109+
msg: String
110+
}
111+
};
112+
</script>
113+
114+
<!-- Add "scoped" attribute to limit CSS to this component only -->
115+
<style scoped>
116+
h3 {
117+
margin: 40px 0 0;
118+
}
119+
ul {
120+
list-style-type: none;
121+
padding: 0;
122+
}
123+
li {
124+
display: inline-block;
125+
margin: 0 10px;
126+
}
127+
a {
128+
color: #42b983;
129+
}
130+
</style>

src/main.js

+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");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// A custom Nightwatch assertion.
2+
// The assertion name is the filename.
3+
// Example usage:
4+
//
5+
// browser.assert.elementCount(selector, count)
6+
//
7+
// For more information on custom assertions see:
8+
// http://nightwatchjs.org/guide#writing-custom-assertions
9+
10+
exports.assertion = function elementCount(selector, count) {
11+
this.message = `Testing if element <${selector}> has count: ${count}`;
12+
this.expected = count;
13+
this.pass = val => val === count;
14+
this.value = res => res.value;
15+
function evaluator(_selector) {
16+
return document.querySelectorAll(_selector).length;
17+
}
18+
this.command = cb => this.api.execute(evaluator, [selector], cb);
19+
};

tests/e2e/specs/test.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// For authoring Nightwatch tests, see
2+
// http://nightwatchjs.org/guide#usage
3+
4+
module.exports = {
5+
"default e2e tests": browser => {
6+
browser
7+
.url(process.env.VUE_DEV_SERVER_URL)
8+
.waitForElementVisible("#app", 5000)
9+
.assert.elementPresent(".hello")
10+
.assert.containsText("h1", "Welcome to Your Vue.js App")
11+
.assert.elementCount("img", 1)
12+
.end();
13+
}
14+
};

tests/unit/.eslintrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
env: {
3+
mocha: true
4+
}
5+
};

tests/unit/example.spec.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { expect } from "chai";
2+
import { shallowMount } from "@vue/test-utils";
3+
import HelloWorld from "@/components/HelloWorld.vue";
4+
5+
describe("HelloWorld.vue", () => {
6+
it("renders props.msg when passed", () => {
7+
const msg = "new message";
8+
const wrapper = shallowMount(HelloWorld, {
9+
propsData: { msg }
10+
});
11+
expect(wrapper.text()).to.include(msg);
12+
});
13+
});

0 commit comments

Comments
 (0)