webpack.js
/**
 * Parses options coming from OS.js build system
 * @param {Object} inp Merge with other input
 * @return {Object}
 */
Parses options coming from OS.js build system
@param {Object} inp Merge with other input
@return {Object}
Parses options coming from OS . js build system @param { Object } inp Merge with other input @return { Object }
function parseOptions(inp) {
  inp = inp || {};
  const env = qs.parse(process.env.OSJS_OPTIONS || '');
  const isNumeric = (n) => !isNaN(parseFloat(n)) && isFinite(n);
  const debugMode = process.env.OSJS_DEBUG === 'true';
  const defaults = {
    debug: debugMode,
    minimize: !debugMode,
    sourcemaps: true,
    exclude: /(node_modules|bower_components)/,
    outputSourceMap: '[file].map',
    outputFileName: '[name].js'
  };
  const options = Object.assign({}, defaults, env, inp);
  Object.keys(options).forEach((k) => {
    const val = options[k];
    if ( val === 'true' ) {
      options[k] = true;
    } else if ( val === 'false' ) {
      options[k] = false;
    } else if ( isNumeric(val) ) {
      options[k] = Math.round(parseFloat(val));
    }
  });
  if ( !options.devtool ) {
    options.devtool = options.debug ? 'inline-source-map' : 'source-map';
  }
  return options;
}
function parseOptions ( inp ) { inp = inp || { } ; const env = qs . parse ( process . env . OSJS_OPTIONS || '' ) ; const isNumeric = ( n ) => ! isNaN ( parseFloat ( n ) ) && isFinite ( n ) ; const debugMode = process . env . OSJS_DEBUG === 'true' ; const defaults = { debug : debugMode , minimize : ! debugMode , sourcemaps : true , exclude : / (node_modules|bower_components) / , outputSourceMap : '[file].map' , outputFileName : '[name].js' } ; const options = Object . assign ( { } , defaults , env , inp ) ; Object . keys ( options ) . forEach ( ( k ) => { const val = options [ k ] ; if ( val === 'true' ) { options [ k ] = true ; } else if ( val === 'false' ) { options [ k ] = false ; } else if ( isNumeric ( val ) ) { options [ k ] = Math . round ( parseFloat ( val ) ) ; } } ) ; if ( ! options . devtool ) { options . devtool = options . debug ? 'inline-source-map' : 'source-map' ; } return options ; }
Parses options coming from OS.js build system
 @param {Object} inp Merge with other input
 @return {Object}
Parses options coming from OS . js build system @param { Object } inp Merge with other input @return { Object }
// Our values does not come back identical :/ //options.devtool = options.debug ? 'source-map' : 'cheap-source-map';