Skip to content

Commit a634040

Browse files
Merge branch 'develop'
# Conflicts: # build/build.js # build/webpack.prod.conf.js # config/dev.env.js # config/index.js # src/App.vue
2 parents 30395bb + cde8f0a commit a634040

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

build/build.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,25 @@ require('shelljs/global')
44
env.NODE_ENV = 'production'
55

66
var path = require('path')
7+
var config = require('../config')
78
var ora = require('ora')
89
var webpack = require('webpack')
910
var webpackConfig = require('./webpack.prod.conf')
1011

12+
console.log(
13+
' Tip:\n' +
14+
' Built files are meant to be served over an HTTP server.\n' +
15+
' Opening index.html over file:// won\'t work.\n'
16+
)
17+
18+
var spinner = ora('building for production...')
19+
spinner.start()
20+
21+
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
22+
rm('-rf', assetsPath)
23+
mkdir('-p', assetsPath)
24+
cp('-R', 'static/*', assetsPath)
25+
1126
var spinner = ora('building for production...')
1227
spinner.start()
1328

config/prod.env.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
NODE_ENV: '"production"'
3+
}

0 commit comments

Comments
 (0)