Skip to content

Commit c7df7d9

Browse files
committed
Move actual gulpfile logic to /build/
1 parent ac6cadf commit c7df7d9

File tree

2 files changed

+42
-38
lines changed

2 files changed

+42
-38
lines changed

build/gulpfile.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
'use strict';
7+
8+
// Increase max listeners for event emitters
9+
require('events').EventEmitter.defaultMaxListeners = 100;
10+
11+
const gulp = require('gulp');
12+
const util = require('./lib/util');
13+
const task = require('./lib/task');
14+
const compilation = require('./lib/compilation');
15+
const { monacoTypecheckTask/* , monacoTypecheckWatchTask */ } = require('./gulpfile.editor');
16+
const { compileExtensionsTask, watchExtensionsTask } = require('./gulpfile.extensions');
17+
18+
// Fast compile for development time
19+
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), compilation.compileTask('src', 'out', false)));
20+
gulp.task(compileClientTask);
21+
22+
const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), compilation.watchTask('out', false)));
23+
gulp.task(watchClientTask);
24+
25+
// All
26+
const compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask));
27+
gulp.task(compileTask);
28+
29+
gulp.task(task.define('watch', task.parallel(/* monacoTypecheckWatchTask, */ watchClientTask, watchExtensionsTask)));
30+
31+
// Default
32+
gulp.task('default', compileTask);
33+
34+
process.on('unhandledRejection', (reason, p) => {
35+
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
36+
process.exit(1);
37+
});
38+
39+
// Load all the gulpfiles only if running tasks other than the editor tasks
40+
require('glob').sync('gulpfile.*.js', { cwd: __dirname })
41+
.forEach(f => require(`./${f}`));

gulpfile.js

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,4 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
8-
// Increase max listeners for event emitters
9-
require('events').EventEmitter.defaultMaxListeners = 100;
10-
11-
const gulp = require('gulp');
12-
const util = require('./build/lib/util');
13-
const task = require('./build/lib/task');
14-
const path = require('path');
15-
const compilation = require('./build/lib/compilation');
16-
const { monacoTypecheckTask/* , monacoTypecheckWatchTask */ } = require('./build/gulpfile.editor');
17-
const { compileExtensionsTask, watchExtensionsTask } = require('./build/gulpfile.extensions');
18-
19-
// Fast compile for development time
20-
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), compilation.compileTask('src', 'out', false)));
21-
gulp.task(compileClientTask);
22-
23-
const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), compilation.watchTask('out', false)));
24-
gulp.task(watchClientTask);
25-
26-
// All
27-
const compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask));
28-
gulp.task(compileTask);
29-
30-
gulp.task(task.define('watch', task.parallel(/* monacoTypecheckWatchTask, */ watchClientTask, watchExtensionsTask)));
31-
32-
// Default
33-
gulp.task('default', compileTask);
34-
35-
process.on('unhandledRejection', (reason, p) => {
36-
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
37-
process.exit(1);
38-
});
39-
40-
// Load all the gulpfiles only if running tasks other than the editor tasks
41-
const build = path.join(__dirname, 'build');
42-
require('glob').sync('gulpfile.*.js', { cwd: build })
43-
.forEach(f => require(`./build/${f}`));
6+
require('./build/gulpfile');

0 commit comments

Comments
 (0)