-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
16 changed files
with
182 additions
and
3,304 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,59 @@ | ||
var config = require('../config') | ||
var utils = require('./utils') | ||
var webpack = require('webpack') | ||
var merge = require('webpack-merge') | ||
var baseWebpackConfig = require('./webpack.base.conf') | ||
var ExtractTextPlugin = require('extract-text-webpack-plugin') | ||
var HtmlWebpackPlugin = require('html-webpack-plugin') | ||
|
||
module.exports = merge(baseWebpackConfig, { | ||
module: { | ||
loaders: utils.styleLoaders({ sourceMap: config.docs.productionSourceMap, extract: true }) | ||
}, | ||
devtool: config.docs.productionSourceMap ? '#source-map' : false, | ||
output: { | ||
path: config.docs.assetsRoot, | ||
filename: utils.assetsPath('js/[name].[chunkhash].js'), | ||
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js'), | ||
publicPath: config.docs.assetsPublicPath | ||
}, | ||
vue: { | ||
loaders: utils.cssLoaders({ | ||
sourceMap: config.docs.productionSourceMap, | ||
extract: true | ||
}) | ||
}, | ||
plugins: [ | ||
// http://vuejs.github.io/vue-loader/workflow/production.html | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: '"production"' | ||
} | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
} | ||
}), | ||
new webpack.optimize.OccurenceOrderPlugin(), | ||
// extract css into its own file | ||
new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')), | ||
// generate dist index.html with correct asset hash for caching. | ||
// you can customize output by editing /index.html | ||
// see https://github.com/ampedandwired/html-webpack-plugin | ||
new HtmlWebpackPlugin({ | ||
filename: process.env.NODE_ENV === 'testing' | ||
? 'index.html' | ||
: config.docs.index, | ||
template: 'docs/index.jade', | ||
inject: true, | ||
minify: { | ||
removeComments: true, | ||
collapseWhitespace: true, | ||
removeAttributeQuotes: true | ||
// more options: | ||
// https://github.com/kangax/html-minifier#options-quick-reference | ||
} | ||
}) | ||
] | ||
}) |
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
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,12 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head><title>pinyin</title> | ||
<link href=./dist/static/css/app.4b3e0d51e2745de27bde2bc46541d2c8.css rel=stylesheet> | ||
<head> | ||
<title>pinyin</title> | ||
</head> | ||
|
||
<body> | ||
<div id=app></div> | ||
<script type=text/javascript src=./dist/static/js/manifest.901189d3769700fc5114.js></script> | ||
<script type=text/javascript src=./dist/static/js/vendor.600f59d30fff71db42d5.js></script> | ||
<script type=text/javascript src=./dist/static/js/app.d9c2fe8d4d689048cf30.js></script> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,43 @@ | ||
<template> | ||
<div class="container"> | ||
<div class="row text-center"> | ||
<div class="col-md-12"> | ||
<h1> vue城市级联选择 </h1> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<cascading-address @confirm="confirmCity"></cascading-address> | ||
</div> | ||
|
||
</div> | ||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<pre>{{ confirmData || 'confirm事件中的data将显示在此处' }}</pre> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="babel"> | ||
import cascadingAddress from './cascadingAddress' | ||
export default { | ||
data(){ | ||
return { | ||
confirmData : '' | ||
} | ||
}, | ||
components: { | ||
cascadingAddress | ||
}, | ||
methods: { | ||
confirmCity(data){ | ||
this.confirmData = data; | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</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
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.