Move actual gulpfile logic to /build/
This commit is contained in:
parent
ac6cadf8ee
commit
c7df7d91f4
41
build/gulpfile.js
Normal file
41
build/gulpfile.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* 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('./lib/util');
|
||||
const task = require('./lib/task');
|
||||
const compilation = require('./lib/compilation');
|
||||
const { monacoTypecheckTask/* , monacoTypecheckWatchTask */ } = require('./gulpfile.editor');
|
||||
const { compileExtensionsTask, watchExtensionsTask } = require('./gulpfile.extensions');
|
||||
|
||||
// Fast compile for development time
|
||||
const compileClientTask = task.define('compile-client', task.series(util.rimraf('out'), compilation.compileTask('src', 'out', false)));
|
||||
gulp.task(compileClientTask);
|
||||
|
||||
const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), compilation.watchTask('out', false)));
|
||||
gulp.task(watchClientTask);
|
||||
|
||||
// All
|
||||
const compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask));
|
||||
gulp.task(compileTask);
|
||||
|
||||
gulp.task(task.define('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
|
||||
require('glob').sync('gulpfile.*.js', { cwd: __dirname })
|
||||
.forEach(f => require(`./${f}`));
|
39
gulpfile.js
39
gulpfile.js
|
@ -3,41 +3,4 @@
|
|||
* 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.define('compile-client', task.series(util.rimraf('out'), compilation.compileTask('src', 'out', false)));
|
||||
gulp.task(compileClientTask);
|
||||
|
||||
const watchClientTask = task.define('watch-client', task.series(util.rimraf('out'), compilation.watchTask('out', false)));
|
||||
gulp.task(watchClientTask);
|
||||
|
||||
// All
|
||||
const compileTask = task.define('compile', task.parallel(monacoTypecheckTask, compileClientTask, compileExtensionsTask));
|
||||
gulp.task(compileTask);
|
||||
|
||||
gulp.task(task.define('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}`));
|
||||
require('./build/gulpfile');
|
||||
|
|
Loading…
Reference in a new issue