File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ var rjs = require('requirejs');
5
5
var knox = require ( 'knox' ) ;
6
6
var glob = require ( "glob" )
7
7
8
+ console . log ( process . argv ) ;
9
+
10
+ var cloudfront = 'https://d3oqwi49u9bqjg.cloudfront.net' ;
11
+
12
+ if ( process . argv [ 2 ] === 'stage' ) {
13
+ var cloudfront = 'https://d7f9lvhhazsa5.cloudfront.net' ;
14
+ }
8
15
9
16
10
17
var version = Date . now ( ) ;
@@ -55,9 +62,9 @@ var rootPath = '..';
55
62
]
56
63
} ) ;
57
64
var index = fs . readFileSync ( rootPath + '/index.html' , 'ascii' ) ;
58
- index = index . replace ( 'css/styles.css' , 'https://d3oqwi49u9bqjg. cloudfront.net /version/' + version + '/css/styles.css' ) ;
65
+ index = index . replace ( 'css/styles.css' , cloudfront + ' /version/' + version + '/css/styles.css' ) ;
59
66
index = index . replace ( '<base href="/repos/apiengine-client/" />' , '' ) ;
60
- index = index . replace ( ' data-main="js/main"' , ' data-main="https://d3oqwi49u9bqjg. cloudfront.net /version/' + version + '/js/main"' ) ;
67
+ index = index . replace ( ' data-main="js/main"' , ' data-main="' + cloudfront + ' /version/' + version + '/js/main"' ) ;
61
68
fs . writeFileSync ( 'output/index.html' , index ) ;
62
69
rjs . optimize ( {
63
70
cssIn : rootPath + '/css/styles.css' ,
Original file line number Diff line number Diff line change 20
20
ga ( 'create' , 'UA-39509998-1' , 'apiengine.io' ) ;
21
21
ga ( 'send' , 'pageview' ) ;
22
22
</ script >
23
- aa
23
+
24
24
</ body >
25
25
</ html >
You can’t perform that action at this time.
0 commit comments