function jsConcat (done) {
  const tasks = jsConfig.map(config => {
    return done => {
      const files = [
        `${tmpDir}/${config.name}.deps.js`,
        `${tmpDir}/${config.name}.build.js`
      ]
      // The allowEmpty option means the task won't fail if
      // one of the temp files does not exist.
      return src(files, { allowEmpty: true })
        .pipe(plumber())
        .pipe(concat(`${config.name}.js`))
        .pipe(dest(destDir))
    }
  })

  return parallel(...tasks, parallelDone => {
    parallelDone()
    done()
  })()
}
// then into a single bundle.
then into a single bundle.
then into a single bundle .
function jsConcat (done) {
  const tasks = jsConfig.map(config => {
    return done => {
      const files = [
        `${tmpDir}/${config.name}.deps.js`,
        `${tmpDir}/${config.name}.build.js`
      ]
      return src(files, { allowEmpty: true })
        .pipe(plumber())
        .pipe(concat(`${config.name}.js`))
        .pipe(dest(destDir))
    }
  })
  return parallel(...tasks, parallelDone => {
    parallelDone()
    done()
  })()
}
function jsConcat ( done ) { const tasks = jsConfig . map ( config => { return done => { const files = [ ` ${ tmpDir } ${ config . name } ` , ` ${ tmpDir } ${ config . name } ` ] return src ( files , { allowEmpty : true } ) . pipe ( plumber ( ) ) . pipe ( concat ( ` ${ config . name } ` ) ) . pipe ( dest ( destDir ) ) } } ) return parallel ( ... tasks , parallelDone => { parallelDone ( ) done ( ) } ) ( ) }
then into a single bundle.
then into a single bundle .
// The allowEmpty option means the task won't fail if // one of the temp files does not exist.