function rebundle(pathToApp) {
    var tasks = pathToApp.map((entry) => {
      const outputPath = entry.split('/').splice(2).join('/');
      const props = {
        entries: [entry],
        debug: true,
        transform: [babelify],
      };

      return browserify(props).transform('uglifyify').bundle()
        .pipe(source(outputPath))

        // rename them to have "bundle as postfix"
        .pipe(gulp.dest(conf.view.dest))
        .once('end', () => {
          console.log('finished building', outputPath);
        });
    });

    return es.merge.apply(null, tasks);
  }
/*
   * Transforms each app file into an app, including translating JSX to JS.
   * Puts the output js in outputPath.
   *
   * @param {Array} pathToApp Array of Path to source app files.
   * @return {Object} bundle Bundled dependencies.
   */
Transforms each app file into an app, including translating JSX to JS.
Puts the output js in outputPath.

@param {Array} pathToApp Array of Path to source app files.
@return {Object} bundle Bundled dependencies.
Transforms each app file into an app including translating JSX to JS . Puts the output js in outputPath . @param { Array } pathToApp Array of Path to source app files . @return { Object } bundle Bundled dependencies .
function rebundle(pathToApp) {
    var tasks = pathToApp.map((entry) => {
      const outputPath = entry.split('/').splice(2).join('/');
      const props = {
        entries: [entry],
        debug: true,
        transform: [babelify],
      };
      return browserify(props).transform('uglifyify').bundle()
        .pipe(source(outputPath))
        .pipe(gulp.dest(conf.view.dest))
        .once('end', () => {
          console.log('finished building', outputPath);
        });
    });
    return es.merge.apply(null, tasks);
  }
function rebundle ( pathToApp ) { var tasks = pathToApp . map ( ( entry ) => { const outputPath = entry . split ( '/' ) . splice ( 2 ) . join ( '/' ) ; const props = { entries : [ entry ] , debug : true , transform : [ babelify ] , } ; return browserify ( props ) . transform ( 'uglifyify' ) . bundle ( ) . pipe ( source ( outputPath ) ) . pipe ( gulp . dest ( conf . view . dest ) ) . once ( 'end' , ( ) => { console . log ( 'finished building' , outputPath ) ; } ) ; } ) ; return es . merge . apply ( null , tasks ) ; }
Transforms each app file into an app, including translating JSX to JS.
Transforms each app file into an app including translating JSX to JS .
// rename them to have "bundle as postfix"