Feat backup

This commit is contained in:
shunfa.xu 2020-05-22 15:17:06 +08:00
parent 310194c41c
commit 41a0d3db44
8 changed files with 183 additions and 346 deletions

View File

@ -1,36 +1,22 @@
// https://github.com/shelljs/shelljs
require('./check-versions')()
require('shelljs/global')
env.NODE_ENV = 'production'
/*
* @Description:
* @Autor: shunfa.xu
* @Date: 2020-05-21 15:55:54
* @LastEditors: shunfa.xu
* @LastEditTime: 2020-05-22 15:07:20
*/
const webpack = require('webpack');
const config = require('./webpack.prod.conf');
var path = require('path')
var config = require('../config')
var ora = require('ora')
var webpack = require('webpack')
var webpackConfig = require('./webpack.prod.conf')
console.log(
' Tip:\n' +
' Built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
)
var spinner = ora('building for production...')
spinner.start()
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
rm('-rf', assetsPath)
mkdir('-p', assetsPath)
cp('-R', 'static/*', assetsPath)
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false
}) + '\n')
})
webpack(config, (err, stats) => {
if (err || stats.hasErrors()) {
// 在这里处理错误
console.error(err);
return;
}
// 处理完成
console.log(stats.toString({
chunks: false, // 使构建过程更静默无输出
colors: true // 在控制台展示颜色
}));
});

View File

@ -1,77 +1,21 @@
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
var env = process.env.NODE_ENV
// check env & config/index.js to decide weither to enable CSS Sourcemaps for the
// various preprocessor loaders added to vue-loader at the end of this file
var cssSourceMapDev = (env === 'development' && config.dev.cssSourceMap)
var cssSourceMapProd = (env === 'production' && config.build.productionSourceMap)
var useCssSourceMap = cssSourceMapDev || cssSourceMapProd
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
app: './src/main.js'
bundle: path.resolve(__dirname, '../src/index.js')
},
output: {
path: config.build.assetsRoot,
publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.vue'],
fallback: [path.join(__dirname, '../node_modules')],
alias: {
'vue$': 'vue/dist/vue.common.js',
'src': path.resolve(__dirname, '../src'),
'assets': path.resolve(__dirname, '../src/assets'),
'components': path.resolve(__dirname, '../src/components')
}
},
resolveLoader: {
fallback: [path.join(__dirname, '../node_modules')]
path: path.resolve(__dirname, '../dist'),
filename: '[name].[hash].js'
},
module: {
loaders: [
{
test: /\.vue$/,
loader: 'vue'
},
{
test: /\.js$/,
loader: 'babel',
include: projectRoot,
exclude: /node_modules/
},
{
test: /\.json$/,
loader: 'json'
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
rules: [
]
},
vue: {
loaders: utils.cssLoaders({ sourceMap: useCssSourceMap }),
postcss: [
require('autoprefixer')({
browsers: ['last 2 versions']
})
]
}
}
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, '../index.html')
})
]
};

View File

@ -1,41 +1,11 @@
/*
* @Description:
* @Autor: shunfa.xu
* @Date: 2020-05-21 15:55:54
* @LastEditors: shunfa.xu
* @LastEditTime: 2020-05-22 14:59:20
*/
var config = require('../config')
var webpack = require('webpack')
var merge = require('webpack-merge')
var utils = require('./utils')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
module: {
loaders: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
},
// eval-source-map is faster for development
devtool: '#eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
// new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
// new webpack.NoErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
})
]
})
const merge = require('webpack-merge');
const path = require('path');
const baseConfig = require('./webpack.base.conf');
module.exports = merge(baseConfig, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
contentBase: path.resolve(__dirname, '../dist'),
open: true
}
});

View File

@ -1,95 +1,18 @@
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var webpack = require('webpack')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var env = config.build.env
var webpackConfig = merge(baseWebpackConfig, {
const merge = require('webpack-merge');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const path = require('path');
const baseConfig = require('./webpack.base.conf');
module.exports = merge(baseConfig, {
mode: 'production',
devtool: 'source-map',
module: {
loaders: utils.styleLoaders({ sourceMap: config.build.productionSourceMap, extract: true })
},
devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
vue: {
loaders: utils.cssLoaders({
sourceMap: config.build.productionSourceMap,
extract: true
})
rules: []
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurrenceOrderPlugin(),
// 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: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
chunks: ['vendor']
new CleanWebpackPlugin(['dist/'], {
root: path.resolve(__dirname, '../'),
verbose: true,
dry: false
})
]
})
if (config.build.productionGzip) {
var CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
module.exports = webpackConfig
});

222
package-lock.json generated
View File

@ -529,12 +529,6 @@
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
"dev": true
},
"async": {
"version": "1.5.2",
"resolved": "https://registry.npm.taobao.org/async/download/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
"dev": true
},
"async-each": {
"version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz",
@ -1731,13 +1725,13 @@
}
},
"camel-case": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-3.0.0.tgz",
"integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/camel-case/download/camel-case-4.1.1.tgz",
"integrity": "sha1-H8QchU8A4vfQE53+uhVC1olv5Uc=",
"dev": true,
"requires": {
"no-case": "^2.2.0",
"upper-case": "^1.1.1"
"pascal-case": "^3.1.1",
"tslib": "^1.10.0"
}
},
"caniuse-api": {
@ -2069,9 +2063,9 @@
"dev": true
},
"commander": {
"version": "2.17.1",
"resolved": "https://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1587781810870&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.17.1.tgz",
"integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=",
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/commander/download/commander-4.1.1.tgz?cache=0&sync_timestamp=1587781810870&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-4.1.1.tgz",
"integrity": "sha1-n9YCvZNilOnp70aj9NaWQESxgGg=",
"dev": true
},
"commondir": {
@ -2742,6 +2736,16 @@
"domelementtype": "1"
}
},
"dot-case": {
"version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/dot-case/download/dot-case-3.0.3.tgz",
"integrity": "sha1-IdO1Lvqroupf2odbsaqBJFIc9Ko=",
"dev": true,
"requires": {
"no-case": "^3.0.3",
"tslib": "^1.10.0"
}
},
"duplexify": {
"version": "3.7.1",
"resolved": "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz",
@ -3150,17 +3154,6 @@
}
}
},
"extract-text-webpack-plugin": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/extract-text-webpack-plugin/download/extract-text-webpack-plugin-1.0.1.tgz",
"integrity": "sha1-yVvzy6rEnclvHcbgclSfu2VMzSw=",
"dev": true,
"requires": {
"async": "^1.5.0",
"loader-utils": "^0.2.3",
"webpack-sources": "^0.1.0"
}
},
"fast-deep-equal": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.1.tgz?cache=0&sync_timestamp=1575383928809&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.1.tgz",
@ -4130,33 +4123,67 @@
"integrity": "sha1-+5oaS1sUxdq6gtPjTGrk/nAaDkQ=",
"dev": true
},
"html-minifier": {
"version": "3.5.21",
"resolved": "https://registry.npm.taobao.org/html-minifier/download/html-minifier-3.5.21.tgz",
"integrity": "sha1-0AQOBUcw41TbAIRjWTGUAVIS0gw=",
"html-minifier-terser": {
"version": "5.1.1",
"resolved": "https://registry.npm.taobao.org/html-minifier-terser/download/html-minifier-terser-5.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-minifier-terser%2Fdownload%2Fhtml-minifier-terser-5.1.1.tgz",
"integrity": "sha1-ki6W8fO7YIMsJjS3mIQJY4mx8FQ=",
"dev": true,
"requires": {
"camel-case": "3.0.x",
"clean-css": "4.2.x",
"commander": "2.17.x",
"he": "1.2.x",
"param-case": "2.1.x",
"relateurl": "0.2.x",
"uglify-js": "3.4.x"
"camel-case": "^4.1.1",
"clean-css": "^4.2.3",
"commander": "^4.1.1",
"he": "^1.2.0",
"param-case": "^3.0.3",
"relateurl": "^0.2.7",
"terser": "^4.6.3"
}
},
"html-webpack-plugin": {
"version": "2.30.1",
"resolved": "https://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-2.30.1.tgz?cache=0&sync_timestamp=1588268411154&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-2.30.1.tgz",
"integrity": "sha1-f5xCG36pHsRg9WUn1430hO51N9U=",
"version": "4.0.0-beta.14",
"resolved": "https://registry.npm.taobao.org/html-webpack-plugin/download/html-webpack-plugin-4.0.0-beta.14.tgz?cache=0&sync_timestamp=1588268411154&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhtml-webpack-plugin%2Fdownload%2Fhtml-webpack-plugin-4.0.0-beta.14.tgz",
"integrity": "sha1-HT3CmaiTkcb7hMbtlOfr5TqSYaA=",
"dev": true,
"requires": {
"bluebird": "^3.4.7",
"html-minifier": "^3.2.3",
"loader-utils": "^0.2.16",
"lodash": "^4.17.3",
"pretty-error": "^2.0.2",
"toposort": "^1.0.0"
"html-minifier-terser": "^5.0.1",
"loader-utils": "^1.2.3",
"lodash": "^4.17.15",
"pretty-error": "^2.1.1",
"tapable": "^1.1.3",
"util.promisify": "1.0.0"
},
"dependencies": {
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.npm.taobao.org/big.js/download/big.js-5.2.2.tgz",
"integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=",
"dev": true
},
"emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz",
"integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=",
"dev": true
},
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/json5/download/json5-1.0.1.tgz?cache=0&sync_timestamp=1586045700847&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjson5%2Fdownload%2Fjson5-1.0.1.tgz",
"integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.4.0.tgz",
"integrity": "sha1-xXm140yzSxp07cbB+za/o3HVphM=",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^1.0.1"
}
}
}
},
"htmlparser2": {
@ -4837,10 +4864,13 @@
}
},
"lower-case": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-1.1.4.tgz",
"integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
"dev": true
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/lower-case/download/lower-case-2.0.1.tgz",
"integrity": "sha1-Oe6zbjlhFcwF4pQi6uqeaSyUCMc=",
"dev": true,
"requires": {
"tslib": "^1.10.0"
}
},
"lru-cache": {
"version": "4.1.5",
@ -5249,12 +5279,13 @@
"dev": true
},
"no-case": {
"version": "2.3.2",
"resolved": "https://registry.npm.taobao.org/no-case/download/no-case-2.3.2.tgz?cache=0&sync_timestamp=1576721505371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fno-case%2Fdownload%2Fno-case-2.3.2.tgz",
"integrity": "sha1-YLgTOWvjmz8SiKTB7V0efSi0ZKw=",
"version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/no-case/download/no-case-3.0.3.tgz?cache=0&sync_timestamp=1576721505371&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fno-case%2Fdownload%2Fno-case-3.0.3.tgz",
"integrity": "sha1-whtDTB/+SLOQh+hs+00lgunfGPg=",
"dev": true,
"requires": {
"lower-case": "^1.1.1"
"lower-case": "^2.0.1",
"tslib": "^1.10.0"
}
},
"node-forge": {
@ -5452,6 +5483,16 @@
"object-keys": "^1.0.11"
}
},
"object.getownpropertydescriptors": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject.getownpropertydescriptors%2Fdownload%2Fobject.getownpropertydescriptors-2.1.0.tgz",
"integrity": "sha1-Npvx+VktiridcS3O1cuBx8U1Jkk=",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1"
}
},
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz",
@ -5676,12 +5717,13 @@
}
},
"param-case": {
"version": "2.1.1",
"resolved": "https://registry.npm.taobao.org/param-case/download/param-case-2.1.1.tgz",
"integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
"version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/param-case/download/param-case-3.0.3.tgz",
"integrity": "sha1-S+Qfg5nv9iHFbuu4KaXkUdmAEjg=",
"dev": true,
"requires": {
"no-case": "^2.2.0"
"dot-case": "^3.0.3",
"tslib": "^1.10.0"
}
},
"parse-asn1": {
@ -5739,6 +5781,16 @@
"integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=",
"dev": true
},
"pascal-case": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/pascal-case/download/pascal-case-3.1.1.tgz?cache=0&sync_timestamp=1577925951636&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpascal-case%2Fdownload%2Fpascal-case-3.1.1.tgz",
"integrity": "sha1-WsGXUTPtYZKB6Ikglz0s0fJ53l8=",
"dev": true,
"requires": {
"no-case": "^3.0.3",
"tslib": "^1.10.0"
}
},
"pascalcase": {
"version": "0.1.1",
"resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz",
@ -8397,12 +8449,6 @@
"integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=",
"dev": true
},
"toposort": {
"version": "1.0.7",
"resolved": "https://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz",
"integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=",
"dev": true
},
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/trim-right/download/trim-right-1.0.1.tgz",
@ -8437,30 +8483,6 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
"uglify-js": {
"version": "3.4.10",
"resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz",
"integrity": "sha1-mtlWPY6zrN+404WX0q8dgV9qdV8=",
"dev": true,
"requires": {
"commander": "~2.19.0",
"source-map": "~0.6.1"
},
"dependencies": {
"commander": {
"version": "2.19.0",
"resolved": "https://registry.npm.taobao.org/commander/download/commander-2.19.0.tgz?cache=0&sync_timestamp=1587781810870&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.19.0.tgz",
"integrity": "sha1-9hmKqE5bg8RgVLlN3tv+1e6f8So=",
"dev": true
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
"dev": true
}
}
},
"unicode-canonical-property-names-ecmascript": {
"version": "1.0.4",
"resolved": "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
@ -8589,12 +8611,6 @@
"integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=",
"dev": true
},
"upper-case": {
"version": "1.1.3",
"resolved": "https://registry.npm.taobao.org/upper-case/download/upper-case-1.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupper-case%2Fdownload%2Fupper-case-1.1.3.tgz",
"integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
"dev": true
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npm.taobao.org/uri-js/download/uri-js-4.2.2.tgz",
@ -8717,6 +8733,16 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
"util.promisify": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil.promisify%2Fdownload%2Futil.promisify-1.0.0.tgz",
"integrity": "sha1-RA9xZaRZyaFtwUXrjnLzVocJcDA=",
"dev": true,
"requires": {
"define-properties": "^1.1.2",
"object.getownpropertydescriptors": "^2.0.3"
}
},
"utila": {
"version": "0.4.0",
"resolved": "https://registry.npm.taobao.org/utila/download/utila-0.4.0.tgz",
@ -10429,16 +10455,6 @@
"lodash": "^4.17.15"
}
},
"webpack-sources": {
"version": "0.1.5",
"resolved": "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-0.1.5.tgz",
"integrity": "sha1-qh86vw8NdNtxEcQOUAuE+WZkB1A=",
"dev": true,
"requires": {
"source-list-map": "~0.1.7",
"source-map": "~0.5.3"
}
},
"websocket-driver": {
"version": "0.6.5",
"resolved": "https://registry.npm.taobao.org/websocket-driver/download/websocket-driver-0.6.5.tgz",

View File

@ -5,6 +5,7 @@
"author": "xsf <416175716@qq.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "node build/dev-server.js",
"build": "node build/build.js"
},
@ -15,20 +16,18 @@
},
"devDependencies": {
"autoprefixer": "^6.4.0",
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-runtime": "^6.0.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"chalk": "^1.1.3",
"clean-webpack-plugin": "^3.0.0",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.25.0",
"eventsource-polyfill": "^0.9.6",
"express": "^4.13.3",
"file-loader": "^0.9.0",
"function-bind": "^1.0.2",
"html-webpack-plugin": "^2.8.1",
"html-webpack-plugin": "^4.0.0-beta.14",
"http-proxy-middleware": "^0.17.2",
"json-loader": "^0.5.4",
"opn": "^4.0.2",
@ -42,8 +41,8 @@
"vue-template-compiler": "^2.6.11",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5",
"webpack-merge": "^4.1.4"
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2"
},
"engines": {
"node": ">= 4.0.0",

View File

@ -1,4 +1,3 @@
<!-- 首页内容渲染 -->
<template>
<div>

View File

@ -1,6 +1,6 @@
/* 项目启动 */
import Vue from 'vue'
import App from './App'
import App from './App.vue'
import router from './router'
new Vue({