File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ var autoprefixer = require('autoprefixer');
1212var  webpack  =  require ( 'webpack' ) ; 
1313var  HtmlWebpackPlugin  =  require ( 'html-webpack-plugin' ) ; 
1414
15+ function  isInDebugMode ( )  { 
16+   return  process . argv . some ( function  ( item )  {  return  item . indexOf ( '--debug-template' )  >  - 1  } ) ; 
17+ } 
18+ 
1519// TODO: hide this behind a flag and eliminate dead code on eject. 
1620// This shouldn't be exposed to the user. 
1721var  isInNodeModules  =  'node_modules'  === 
1822  path . basename ( path . resolve ( path . join ( __dirname ,  '..' ,  '..' ) ) ) ; 
1923var  relativePath  =  isInNodeModules  ? '../../..'  : '..' ; 
20- if  ( process . argv [ 2 ]   ===   '--debug-template' )  { 
24+ if  ( isInDebugMode ( ) )  { 
2125  relativePath  =  '../template' ; 
2226} 
2327var  srcPath  =  path . resolve ( __dirname ,  relativePath ,  'src' ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments