// https://github.com/shelljs/shelljsrequire('./check-versions')()require('shelljs/global')env.NODE_ENV='production'varpath=require('path')varconfig=require('../config')varora=require('ora')varwebpack=require('webpack')varwebpackConfig=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')varspinner=ora('building for production...')spinner.start()varassetsPath=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)throwerrprocess.stdout.write(stats.toString({colors:true,modules:false,children:false,chunks:false,chunkModules:false})+'\n')})