gulpfile.js
function compile(srcs, out, args) {
  // Get the compiler arguments, using the defaults if not specified.
  const combinedArgs = Object.assign({}, COMPILER_DEFAULT_ARGS, args);
  return gulp
      .src(srcs)
      .pipe(closureCompiler({
        compilerPath: COMPILER_PATH,
        fileName: path.basename(out),
        compilerFlags: combinedArgs
      }))
      .pipe(gulp.dest(path.dirname(out)));
}
function compile(srcs, out, args) {
  // Get the compiler arguments, using the defaults if not specified.
  const combinedArgs = Object.assign({}, COMPILER_DEFAULT_ARGS, args);
  return gulp
      .src(srcs)
      .pipe(closureCompiler({
        compilerPath: COMPILER_PATH,
        fileName: path.basename(out),
        compilerFlags: combinedArgs
      }))
      .pipe(gulp.dest(path.dirname(out)));
}
function compile ( srcs , out , args ) { // Get the compiler arguments, using the defaults if not specified. const combinedArgs = Object . assign ( { } , COMPILER_DEFAULT_ARGS , args ) ; return gulp . src ( srcs ) . pipe ( closureCompiler ( { compilerPath : COMPILER_PATH , fileName : path . basename ( out ) , compilerFlags : combinedArgs } ) ) . pipe ( gulp . dest ( path . dirname ( out ) ) ) ; }
Invokes Closure Compiler.
@param {!Array<string>} srcs The JS sources to compile.
@param {string} out The path to the output JS file.
@param {!Object} args Additional arguments to Closure compiler.
@return {*} A stream that finishes when compliation finishes.
Invokes Closure Compiler .