This repository was archived by the owner on Jan 26, 2019. It is now read-only.
File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,15 @@ var autoprefixer = require('autoprefixer');
12
12
var webpack = require ( 'webpack' ) ;
13
13
var HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
14
14
15
- function isInDebugMode ( ) {
16
- return process . argv . some ( function ( item ) { return item . indexOf ( '--debug-template' ) > - 1 } ) ;
17
- }
18
-
19
15
// TODO: hide this behind a flag and eliminate dead code on eject.
20
16
// This shouldn't be exposed to the user.
21
17
var isInNodeModules = 'node_modules' ===
22
18
path . basename ( path . resolve ( path . join ( __dirname , '..' , '..' ) ) ) ;
23
19
var relativePath = isInNodeModules ? '../../..' : '..' ;
24
- if ( isInDebugMode ( ) ) {
20
+ var isInDebugMode = process . argv . some ( arg =>
21
+ arg . indexOf ( '--debug-template' ) > - 1
22
+ ) ;
23
+ if ( isInDebugMode ) {
25
24
relativePath = '../template' ;
26
25
}
27
26
var srcPath = path . resolve ( __dirname , relativePath , 'src' ) ;
Original file line number Diff line number Diff line change @@ -17,14 +17,13 @@ var config = require('../config/webpack.config.dev');
17
17
var execSync = require ( 'child_process' ) . execSync ;
18
18
var opn = require ( 'opn' ) ;
19
19
20
- function isSmokeTest ( ) {
21
- return process . argv . some ( function ( item ) { return item . indexOf ( '--smoke-test' ) > - 1 } ) ;
22
- }
23
-
24
20
// TODO: hide this behind a flag and eliminate dead code on eject.
25
21
// This shouldn't be exposed to the user.
26
22
var handleCompile ;
27
- if ( isSmokeTest ( ) ) {
23
+ var isSmokeTest = process . argv . some ( arg =>
24
+ arg . indexOf ( '--smoke-test' ) > - 1
25
+ ) ;
26
+ if ( isSmokeTest ) {
28
27
handleCompile = function ( err , stats ) {
29
28
if ( err || stats . hasErrors ( ) || stats . hasWarnings ( ) ) {
30
29
process . exit ( 1 ) ;
You can’t perform that action at this time.
0 commit comments