Skip to content

Commit 5bc99a1

Browse files
Merge pull request geektime-geekbang#5 from tangjinzhou/master
vuex code update
2 parents 121aabc + 11ce676 commit 5bc99a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+34588
-180
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
# geektime-vue-1
2-
极客时间基础篇代码
2+
极客时间基础篇&生态篇代码
3+
4+
## 源码使用指南
5+
6+
进入相应文件夹(有package.json的那个)后执行以下步骤:
7+
8+
### 安装依赖
9+
```
10+
npm install
11+
```
12+
13+
### 启动环境
14+
```
15+
npm run serve
16+
```

环境搭建部分代码/hello-world/README.md renamed to router-demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# hello-world1
1+
# router-demo
22

33
## Project setup
44
```

router-demo/package-lock.json

Lines changed: 11180 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

router-demo/package.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "router-demo",
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+
"vue": "^2.6.6",
12+
"vue-router": "^3.0.2"
13+
},
14+
"devDependencies": {
15+
"@vue/cli-plugin-babel": "^3.5.0",
16+
"@vue/cli-plugin-eslint": "^3.5.0",
17+
"@vue/cli-service": "^3.5.0",
18+
"babel-eslint": "^10.0.1",
19+
"eslint": "^5.8.0",
20+
"eslint-plugin-vue": "^5.0.0",
21+
"vue-template-compiler": "^2.5.21"
22+
},
23+
"eslintConfig": {
24+
"root": true,
25+
"env": {
26+
"node": true
27+
},
28+
"extends": [
29+
"plugin:vue/essential",
30+
"eslint:recommended"
31+
],
32+
"rules": {},
33+
"parserOptions": {
34+
"parser": "babel-eslint"
35+
}
36+
},
37+
"postcss": {
38+
"plugins": {
39+
"autoprefixer": {}
40+
}
41+
},
42+
"browserslist": [
43+
"> 1%",
44+
"last 2 versions",
45+
"not ie <= 8"
46+
]
47+
}

环境搭建部分代码/hello-world/public/index.html renamed to router-demo/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title>hello-world1</title>
8+
<title>router-demo</title>
99
</head>
1010
<body>
1111
<noscript>
12-
<strong>We're sorry but hello-world1 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
12+
<strong>We're sorry but router-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1313
</noscript>
1414
<div id="app"></div>
1515
<!-- built files will be auto injected -->

环境搭建部分代码/hello-world/src/App.vue renamed to router-demo/src/App.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<template>
22
<div id="app">
3-
<img alt="Vue logo" src="./assets/logo.png">
4-
<HelloWorld msg="Welcome to Your Vue.js App"/>
3+
<h2>router demo</h2>
4+
<router-view></router-view>
55
</div>
66
</template>
77

88
<script>
9-
import HelloWorld from './components/HelloWorld.vue'
109
1110
export default {
1211
name: 'app',
1312
components: {
14-
HelloWorld
15-
}
13+
},
1614
}
1715
</script>
1816

0 commit comments

Comments
 (0)