tasks/deploy/minify.js
function writeExterns (grunt, fileData, options) {
    let content = '';

    // Default externs.
    content += 'var require = function () {};';

    for (let i = 0, max = options.externs.length; i < max; i++) {
        content += `var ${options.externs[i]} = {};`;
    }

    grunt.file.write(fileData.tmpExterns, content);
}
function writeExterns (grunt, fileData, options) {
    let content = '';

    // Default externs.
    content += 'var require = function () {};';

    for (let i = 0, max = options.externs.length; i < max; i++) {
        content += `var ${options.externs[i]} = {};`;
    }

    grunt.file.write(fileData.tmpExterns, content);
}
function writeExterns ( grunt , fileData , options ) { let content = '' ; // Default externs. content += 'var require = function () {};' ; for ( let i = 0 , max = options . externs . length ; i < max ; i ++ ) { content += ` ${ options . externs [ i ] } ` ; } grunt . file . write ( fileData . tmpExterns , content ) ; }
Concatenate each extern as a variable declaration that points to an empty object.
Externs are used to prevent the closure compiler from complaining about undeclared
variables and renaming those variables.

@function writeExterns
@param {Object} grunt
@param {Object} fileData
@param {Object} options
@api private
Concatenate each extern as a variable declaration that points to an empty object . Externs are used to prevent the closure compiler from complaining about undeclared variables and renaming those variables .