vscode/build/gulpfile.compile.js

36 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-02-05 17:03:46 +08:00
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
2019-02-05 17:03:46 +08:00
'use strict';
const gulp = require('gulp');
2019-02-05 17:03:46 +08:00
const util = require('./lib/util');
const date = require('./lib/date');
2019-02-12 22:13:43 +08:00
const task = require('./lib/task');
2019-02-05 17:03:46 +08:00
const compilation = require('./lib/compilation');
/**
* @param {boolean} disableMangle
*/
function makeCompileBuildTask(disableMangle) {
return task.series(
2021-01-07 03:36:22 +08:00
util.rimraf('out-build'),
date.writeISODate('out-build'),
compilation.compileApiProposalNamesTask,
2024-09-27 14:04:56 +08:00
compilation.compileTask('src', 'out-build', true, { disableMangle })
);
}
// Full compile, including nls and inline sources in sourcemaps, mangling, minification, for build
const compileBuildTask = task.define('compile-build', makeCompileBuildTask(false));
gulp.task(compileBuildTask);
2021-01-07 03:36:22 +08:00
exports.compileBuildTask = compileBuildTask;
// Full compile for PR ci, e.g no mangling
const compileBuildTaskPullRequest = task.define('compile-build-pr', makeCompileBuildTask(true));
gulp.task(compileBuildTaskPullRequest);
exports.compileBuildTaskPullRequest = compileBuildTaskPullRequest;