packages/auth/gulpfile.js
function createBuildTask(filename, prefix, suffix) {
  return () =>
    gulp
      .src([
        `${closureLibRoot}/closure/goog/**/*.js`,
        `${closureLibRoot}/third_party/closure/goog/**/*.js`,
        'src/**/*.js'
      ], { base: '.' })
      .pipe(sourcemaps.init())
      .pipe(
        closureCompiler({
          js_output_file: filename,
          output_wrapper: `${prefix}%output%${suffix}`,
          entry_point: 'fireauth.exports',
          compilation_level: OPTIMIZATION_LEVEL,
          externs: [
            'externs/externs.js',
            'externs/grecaptcha.js',
            'externs/gapi.iframes.js',
            path.resolve(
              __dirname,
              '../firebase/externs/firebase-app-externs.js'
            ),
            path.resolve(
              __dirname,
              '../firebase/externs/firebase-error-externs.js'
            ),
            path.resolve(
              __dirname,
              '../firebase/externs/firebase-app-internal-externs.js'
            )
          ],
          language_out: 'ES5',
          only_closure_dependencies: true
        })
      )
      .pipe(sourcemaps.write('.'))
      .pipe(gulp.dest('dist'));
}
function createBuildTask(filename, prefix, suffix) {
  return () =>
    gulp
      .src([
        `${closureLibRoot}/closure/goog/**/*.js`,
        `${closureLibRoot}/third_party/closure/goog/**/*.js`,
        'src/**/*.js'
      ], { base: '.' })
      .pipe(sourcemaps.init())
      .pipe(
        closureCompiler({
          js_output_file: filename,
          output_wrapper: `${prefix}%output%${suffix}`,
          entry_point: 'fireauth.exports',
          compilation_level: OPTIMIZATION_LEVEL,
          externs: [
            'externs/externs.js',
            'externs/grecaptcha.js',
            'externs/gapi.iframes.js',
            path.resolve(
              __dirname,
              '../firebase/externs/firebase-app-externs.js'
            ),
            path.resolve(
              __dirname,
              '../firebase/externs/firebase-error-externs.js'
            ),
            path.resolve(
              __dirname,
              '../firebase/externs/firebase-app-internal-externs.js'
            )
          ],
          language_out: 'ES5',
          only_closure_dependencies: true
        })
      )
      .pipe(sourcemaps.write('.'))
      .pipe(gulp.dest('dist'));
}
function createBuildTask ( filename , prefix , suffix ) { return ( ) => gulp . src ( [ ` ${ closureLibRoot } ` , ` ${ closureLibRoot } ` , 'src/**/*.js' ] , { base : '.' } ) . pipe ( sourcemaps . init ( ) ) . pipe ( closureCompiler ( { js_output_file : filename , output_wrapper : ` ${ prefix } ${ suffix } ` , entry_point : 'fireauth.exports' , compilation_level : OPTIMIZATION_LEVEL , externs : [ 'externs/externs.js' , 'externs/grecaptcha.js' , 'externs/gapi.iframes.js' , path . resolve ( __dirname , '../firebase/externs/firebase-app-externs.js' ) , path . resolve ( __dirname , '../firebase/externs/firebase-error-externs.js' ) , path . resolve ( __dirname , '../firebase/externs/firebase-app-internal-externs.js' ) ] , language_out : 'ES5' , only_closure_dependencies : true } ) ) . pipe ( sourcemaps . write ( '.' ) ) . pipe ( gulp . dest ( 'dist' ) ) ; }
Builds the core Firebase-auth JS.
@param {string} filename name of the generated file
@param {string} prefix prefix to the compiled code
@param {string} suffix suffix to the compiled code
Builds the core Firebase - auth JS .