Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/build/gulpfile.compile.js
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
//@ts-check
7
'use strict';
8
9
const gulp = require('gulp');
10
const util = require('./lib/util');
11
const date = require('./lib/date');
12
const task = require('./lib/task');
13
const compilation = require('./lib/compilation');
14
15
/**
16
* @param {boolean} disableMangle
17
*/
18
function makeCompileBuildTask(disableMangle) {
19
return task.series(
20
util.rimraf('out-build'),
21
date.writeISODate('out-build'),
22
compilation.compileApiProposalNamesTask,
23
compilation.compileTask('src', 'out-build', true, { disableMangle })
24
);
25
}
26
27
// Local/PR compile, including nls and inline sources in sourcemaps, minification, no mangling
28
const compileBuildWithoutManglingTask = task.define('compile-build-without-mangling', makeCompileBuildTask(true));
29
gulp.task(compileBuildWithoutManglingTask);
30
exports.compileBuildWithoutManglingTask = compileBuildWithoutManglingTask;
31
32
// CI compile, including nls and inline sources in sourcemaps, mangling, minification, for build
33
const compileBuildWithManglingTask = task.define('compile-build-with-mangling', makeCompileBuildTask(false));
34
gulp.task(compileBuildWithManglingTask);
35
exports.compileBuildWithManglingTask = compileBuildWithManglingTask;
36
37