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

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Dima <alexdima@microsoft.com>2016-10-19 19:56:20 +0300
committerAlex Dima <alexdima@microsoft.com>2016-10-19 19:56:31 +0300
commit9e1b35badbdf033b0bdfe85a7fc89008978c8ef8 (patch)
tree9503a9c6c888b465c6e7013ace27f3b6d62aaaf9 /gulpfile.js
parent37c04d7ddfc8b4c0adf5cf9c7ea2e5ef6335ba6d (diff)
Add monaco-editor-setup script
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js27
1 files changed, 13 insertions, 14 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 7124c17e6c9..0f0ed8b046c 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -9,6 +9,14 @@
require('events').EventEmitter.defaultMaxListeners = 100;
const gulp = require('gulp');
+// Record all defined tasks to determine later in this file (at the bottom)
+// if further gulpfiles need to be included or not
+var ALL_KNOWN_TASKS = [], originalGulpTask = gulp.task;
+gulp.task = function() {
+ ALL_KNOWN_TASKS.push(arguments[0]);
+ return originalGulpTask.apply(gulp, Array.prototype.slice.call(arguments, 0));
+};
+
const json = require('gulp-json-editor');
const buffer = require('gulp-buffer');
const tsb = require('gulp-tsb');
@@ -258,22 +266,13 @@ gulp.task('mixin', function () {
.pipe(gulp.dest('.'));
});
-var ALL_EDITOR_TASKS = [
- 'clean-optimized-editor',
- 'optimize-editor',
- 'clean-minified-editor',
- 'minify-editor',
- 'clean-editor-distro',
- 'editor-distro',
- 'analyze-editor-distro'
-];
-var runningEditorTasks = process.argv.slice(2).every(function(arg) {
- return (ALL_EDITOR_TASKS.indexOf(arg) !== -1);
+require(`./build/gulpfile.editor`);
+
+var runningKnownTasks = process.argv.slice(2).every(function(arg) {
+ return (ALL_KNOWN_TASKS.indexOf(arg) !== -1);
});
-if (runningEditorTasks) {
- require(`./build/gulpfile.editor`);
-} else {
+if (!runningKnownTasks) {
// Load all the gulpfiles only if running tasks other than the editor tasks
const build = path.join(__dirname, 'build');
glob.sync('gulpfile.*.js', { cwd: build })