Skip to content

Commit a0ff233

Browse files
committed
初始化项目代码,src/components/tree 为主要组件
1 parent 72b1bf1 commit a0ff233

File tree

14 files changed

+248
-96
lines changed

14 files changed

+248
-96
lines changed

build/webpack.base.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function resolve (dir) {
99

1010
module.exports = {
1111
entry: {
12-
app: './src/main.js'
12+
app: './example/main.js'
1313
},
1414
output: {
1515
path: config.build.assetsRoot,
@@ -21,8 +21,8 @@ module.exports = {
2121
resolve: {
2222
extensions: ['.js', '.vue', '.json'],
2323
alias: {
24-
'vue$': 'vue/dist/vue.esm.js',
25-
'@': resolve('src'),
24+
'vue': 'vue/dist/vue.esm.js',
25+
'src': resolve('src'),
2626
}
2727
},
2828
module: {

build/webpack.dev.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = merge(baseWebpackConfig, {
2727
// https://github.com/ampedandwired/html-webpack-plugin
2828
new HtmlWebpackPlugin({
2929
filename: 'index.html',
30-
template: 'index.html',
30+
template: 'example/index.html',
3131
inject: true
3232
}),
3333
new FriendlyErrorsPlugin()

config/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ var path = require('path')
44
module.exports = {
55
build: {
66
env: require('./prod.env'),
7-
index: path.resolve(__dirname, '../dist/index.html'),
8-
assetsRoot: path.resolve(__dirname, '../dist'),
7+
index: path.resolve(__dirname, '../example-dist/index.html'),
8+
assetsRoot: path.resolve(__dirname, '../example-dist'),
99
assetsSubDirectory: 'static',
1010
assetsPublicPath: '/',
1111
productionSourceMap: true,
@@ -23,7 +23,7 @@ module.exports = {
2323
},
2424
dev: {
2525
env: require('./dev.env'),
26-
port: 8080,
26+
port: 8088,
2727
autoOpenBrowser: true,
2828
assetsSubDirectory: 'static',
2929
assetsPublicPath: '/',

example/App.vue

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<div id="app">
3+
<tree :data="data"></tree>
4+
</div>
5+
</template>
6+
7+
<script>
8+
import Tree from 'src/components/tree'
9+
10+
export default {
11+
name: 'app',
12+
components: {
13+
Tree
14+
},
15+
data () {
16+
return {
17+
data: {
18+
a: 1,
19+
b: [{
20+
a: 1,
21+
b: 2
22+
}]
23+
}
24+
}
25+
}
26+
}
27+
</script>
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"private": true,
77
"scripts": {
88
"dev": "node build/dev-server.js",
9-
"start": "node build/dev-server.js",
109
"build": "node build/build.js",
1110
"e2e": "node test/e2e/runner.js",
1211
"test": "npm run e2e",
@@ -25,15 +24,17 @@
2524
"babel-preset-stage-2": "^6.22.0",
2625
"babel-register": "^6.22.0",
2726
"chalk": "^2.0.1",
27+
"chromedriver": "^2.27.2",
2828
"connect-history-api-fallback": "^1.3.0",
2929
"copy-webpack-plugin": "^4.0.1",
30+
"cross-spawn": "^5.0.1",
3031
"css-loader": "^0.28.0",
3132
"cssnano": "^3.10.0",
3233
"eslint": "^3.19.0",
34+
"eslint-config-standard": "^6.2.1",
3335
"eslint-friendly-formatter": "^3.0.0",
3436
"eslint-loader": "^1.7.1",
3537
"eslint-plugin-html": "^3.0.0",
36-
"eslint-config-standard": "^6.2.1",
3738
"eslint-plugin-promise": "^3.4.0",
3839
"eslint-plugin-standard": "^2.0.1",
3940
"eventsource-polyfill": "^0.9.6",
@@ -43,22 +44,22 @@
4344
"friendly-errors-webpack-plugin": "^1.1.3",
4445
"html-webpack-plugin": "^2.28.0",
4546
"http-proxy-middleware": "^0.17.3",
46-
"webpack-bundle-analyzer": "^2.2.1",
47-
"chromedriver": "^2.27.2",
48-
"cross-spawn": "^5.0.1",
47+
"less": "^2.7.2",
48+
"less-loader": "^4.0.4",
4949
"nightwatch": "^0.9.12",
50-
"selenium-server": "^3.0.1",
51-
"semver": "^5.3.0",
52-
"shelljs": "^0.7.6",
5350
"opn": "^5.1.0",
5451
"optimize-css-assets-webpack-plugin": "^2.0.0",
5552
"ora": "^1.2.0",
5653
"rimraf": "^2.6.0",
54+
"selenium-server": "^3.0.1",
55+
"semver": "^5.3.0",
56+
"shelljs": "^0.7.6",
5757
"url-loader": "^0.5.8",
5858
"vue-loader": "^13.0.4",
5959
"vue-style-loader": "^3.0.1",
6060
"vue-template-compiler": "^2.4.2",
6161
"webpack": "^2.6.1",
62+
"webpack-bundle-analyzer": "^2.2.1",
6263
"webpack-dev-middleware": "^1.10.0",
6364
"webpack-hot-middleware": "^2.18.0",
6465
"webpack-merge": "^4.1.0"

src/App.vue

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/assets/logo.png

-6.69 KB
Binary file not shown.

src/components/Hello.vue

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)