Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gulpfile.js - github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2f43d0e73ed6300eb8cad8964d00fd0e64065a5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

'use strict';

// Increase max listeners for event emitters
require('events').EventEmitter.defaultMaxListeners = 100;

const gulp = require('gulp');
const util = require('./build/lib/util');
const task = require('./build/lib/task');
const path = require('path');
const compilation = require('./build/lib/compilation');
const { monacoTypecheckTask/* , monacoTypecheckWatchTask */ } = require('./build/gulpfile.editor');
const { compileExtensionsTask, watchExtensionsTask } = require('./build/gulpfile.extensions');

// Fast compile for development time
const compileClientTask = task.series(util.rimraf('out'), compilation.compileTask('src', 'out', false));
compileClientTask.displayName = 'compile-client';
gulp.task(compileClientTask.displayName, compileClientTask);

const watchClientTask = task.series(util.rimraf('out'), compilation.watchTask('out', false));
watchClientTask.displayName = 'watch-client';
gulp.task(watchClientTask.displayName, watchClientTask);

// All
const compileTask = task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask);
compileTask.displayName = 'compile';
gulp.task(compileTask.displayName, compileTask);

gulp.task('watch', task.parallel(/* monacoTypecheckWatchTask, */ watchClientTask, watchExtensionsTask));

// Default
gulp.task('default', compileTask);

process.on('unhandledRejection', (reason, p) => {
	console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
	process.exit(1);
});

// Load all the gulpfiles only if running tasks other than the editor tasks
const build = path.join(__dirname, 'build');
require('glob').sync('gulpfile.*.js', { cwd: build })
	.forEach(f => require(`./build/${f}`));