File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,25 @@ require('shelljs/global')
4
4
env . NODE_ENV = 'production'
5
5
6
6
var path = require ( 'path' )
7
+ var config = require ( '../config' )
7
8
var ora = require ( 'ora' )
8
9
var webpack = require ( 'webpack' )
9
10
var webpackConfig = require ( './webpack.prod.conf' )
10
11
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
+
11
26
var spinner = ora ( 'building for production...' )
12
27
spinner . start ( )
13
28
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ NODE_ENV : '"production"'
3
+ }
You can’t perform that action at this time.
0 commit comments