function doBuild()

in gulpfile.js [53:81]


function doBuild(buildNls, failOnError) {
    return () => {
        let gotError = false;

        const tsResult = tsProject.src()
            .pipe(sourcemaps.init())
            .pipe(tsProject())
            .once('error', () => {
                gotError = true;
            });

        return tsResult.js
            .pipe(buildNls ? nls.rewriteLocalizeCalls() : es.through())
            .pipe(buildNls ? nls.createAdditionalLanguageFiles(defaultLanguages, 'i18n', 'out') : es.through())
            .pipe(buildNls ? nls.bundleMetaDataFiles('ms-vscode.vscode-chrome-debug', 'out') : es.through())
            .pipe(buildNls ? nls.bundleLanguageFiles() : es.through())

            .pipe(sourcemaps.write('.', { includeContent: false, sourceRoot: '.' })) // .. to compensate for TS returning paths from 'out'
            .pipe(gulp.dest('out'))
            .once('error', () => {
                gotError = true;
            })
            .once('finish', () => {
                if (failOnError && gotError) {
                    process.exit(1);
                }
            });
    };
}