-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
邢光
committed
Mar 17, 2017
1 parent
d820282
commit cec525e
Showing
20 changed files
with
7,941 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": [ | ||
["latest", { | ||
"es2015": { "modules": false } | ||
}], | ||
"stage-2" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// http://eslint.org/docs/user-guide/configuring | ||
|
||
module.exports = { | ||
root: true, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
env: { | ||
browser: true, | ||
}, | ||
extends: 'standard', | ||
plugins: [ | ||
'html' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
node_modules | ||
dist | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: node_js | ||
node_js: | ||
- node | ||
- --lts # LTS: See https://github.com/creationix/nvm/pull/1070 | ||
branches: | ||
only: | ||
- dev | ||
install: | ||
- npm install | ||
script: | ||
- npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
var path = require('path') | ||
|
||
function resolve (dir) { | ||
return path.join(__dirname, '..', dir) | ||
} | ||
|
||
module.exports = { | ||
entry: { | ||
app: './examples/main.js' | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
filename: 'index.js', | ||
publicPath: '/' | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.vue'], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm.js' | ||
} | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|vue)$/, | ||
loader: 'eslint-loader', | ||
enforce: "pre", | ||
include: [resolve('examples'), resolve('src')], | ||
options: { | ||
formatter: require('eslint-friendly-formatter') | ||
} | ||
}, | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: { | ||
sourceMap: true | ||
} | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
include: [resolve('./src'), resolve('./examples')] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var webpack = require('webpack') | ||
var merge = require('webpack-merge') | ||
var path = require('path') | ||
var baseWebpackConfig = require('./webpack.base.config') | ||
var HtmlWebpackPlugin = require('html-webpack-plugin') | ||
var opn = require('opn') | ||
|
||
opn('http://localhost:8099') | ||
module.exports = merge(baseWebpackConfig, { | ||
devtool: '#source-map', | ||
devServer: { | ||
port: '8099', | ||
contentBase: path.join(__dirname, "dist") | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': '"development"' | ||
}), | ||
new HtmlWebpackPlugin({ | ||
filename: 'index.html', | ||
template: './examples/index.html', | ||
inject: true | ||
}), | ||
new webpack.HotModuleReplacementPlugin() | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
var path = require('path') | ||
var webpack = require('webpack') | ||
var merge = require('webpack-merge') | ||
var baseWebpackConfig = require('./webpack.base.config') | ||
var HtmlWebpackPlugin = require('html-webpack-plugin') | ||
|
||
module.exports = merge(baseWebpackConfig, { | ||
devtool: '#source-map', | ||
output: { | ||
path: path.resolve(__dirname, '../dist'), | ||
filename: 'js/[name].[chunkhash:8].js', | ||
chunkFilename: 'js/[id].[chunkhash:8].js' | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': '"production"' | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
}, | ||
sourceMap: true | ||
}), | ||
new HtmlWebpackPlugin({ | ||
filename: 'index.html', | ||
template: './examples/index.html', | ||
inject: true | ||
}), | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: 'vendor', | ||
minChunks: function (module, count) { | ||
return ( | ||
module.resource && | ||
/\.js$/.test(module.resource) && | ||
module.resource.indexOf( | ||
path.join(__dirname, '../node_modules') | ||
) === 0 | ||
) | ||
} | ||
}), | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: 'manifest', | ||
chunks: ['vendor'] | ||
}) | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div class="page-app"> | ||
2 | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'App', | ||
created () { | ||
console.log(1) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="less"> | ||
.page-app { | ||
background-color: red; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>vue-echarts-components</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import App from './App' | ||
import Vue from 'vue' | ||
/* eslint-disable no-new */ | ||
new Vue({ | ||
el: '#app', | ||
template: '<App/>', | ||
components: { App } | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.
Empty file.
Oops, something went wrong.