sebastien 6 år sedan
förälder
incheckning
18b944c704

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 1457
Tools/Gulp/config.json


+ 0 - 220
Tools/Gulp/gulpfile.js

@@ -1,25 +1,6 @@
 // Gulp Tools
 var gulp = require("gulp");
-// var uglify = require("gulp-uglify");
-// var typescript = require("gulp-typescript");
-// var sourcemaps = require("gulp-sourcemaps");
-// var srcToVariable = require("gulp-content-to-variable");
-// var merge2 = require("merge2");
-// var concat = require("gulp-concat");
-// var rename = require("gulp-rename");
-// var cleants = require("gulp-clean-ts-extends");
-// var replace = require("gulp-replace");
-// var expect = require("gulp-expect-file");
 // var optimisejs = require("gulp-optimize-js");
-// var filter = require('gulp-filter');
-// var path = require("path");
-
-// // Gulp Helpers
-// var addDtsExport = require("./helpers/gulp-addDtsExport");
-// var addDecorateAndExtends = require("./helpers/gulp-decorateAndExtends");
-// var addModuleExports = require("./helpers/gulp-addModuleExports");
-// var addES6Exports = require("./helpers/gulp-addES6Exports");
-// var uncommentShader = require("./helpers/gulp-removeShaderComments");
 
 // Import Gulp Tasks
 require("./tasks/gulpTasks-libraries");
@@ -33,207 +14,6 @@ require("./tasks/gulpTasks-typedoc");
 require("./tasks/gulpTasks-intellisense");
 require("./tasks/gulpTasks-tests");
 
-// // Import Build Config
-// var config = require("./config.json");
-
-// var includeShadersStream;
-// var shadersStream;
-
-// var extendsSearchRegex = /var\s__extends[\s\S]+?\}\)\(\);/g;
-// var decorateSearchRegex = /var\s__decorate[\s\S]+?\};/g;
-
-// /**
-//  * TS configurations shared in the gulp file.
-//  */
-// var tsConfig = {
-//     noResolve: true,
-//     target: "ES5",
-//     declarationFiles: true,
-//     typescript: require("typescript"),
-//     experimentalDecorators: true,
-//     isolatedModules: false,
-//     noImplicitAny: true,
-//     noImplicitReturns: true,
-//     noImplicitThis: true,
-//     noUnusedLocals: true,
-//     strictNullChecks: true,
-//     strictFunctionTypes: true,
-//     types: [],
-//     lib: [
-//         "dom",
-//         "es2015.promise",
-//         "es5"
-//     ]
-// };
-// var tsProject = typescript.createProject(tsConfig);
-
-// function processDependency(kind, dependency, filesToLoad, firstLevelOnly) {
-//     if (!firstLevelOnly && dependency.dependUpon) {
-//         for (var i = 0; i < dependency.dependUpon.length; i++) {
-//             var dependencyName = dependency.dependUpon[i];
-//             var parent = config.workloads[dependencyName];
-//             processDependency(kind, parent, filesToLoad);
-//         }
-//     }
-
-//     var content = dependency[kind];
-//     if (!content) {
-//         return;
-//     }
-
-//     for (var i = 0; i < content.length; i++) {
-//         var file = content[i];
-
-//         if (filesToLoad.indexOf(file) === -1) {
-//             filesToLoad.push(file);
-//         }
-//     }
-// }
-
-// function determineFilesToProcess(kind) {
-//     var currentConfig = config.build.currentConfig;
-//     var buildConfiguration = config.buildConfigurations[currentConfig];
-//     var filesToLoad = [];
-
-//     for (var index = 0; index < buildConfiguration.length; index++) {
-//         var dependencyName = buildConfiguration[index];
-//         var dependency = config.workloads[dependencyName];
-
-//         if (kind === "directFiles" && !dependency) {
-//             filesToLoad.push("../../dist/preview release/" + dependencyName);
-//         }
-//         else if (dependency) {
-//             processDependency(kind, dependency, filesToLoad);
-//         }
-//     }
-
-//     if (kind === "shaderIncludes") {
-//         for (var index = 0; index < filesToLoad.length; index++) {
-//             filesToLoad[index] = "../../src/Shaders/ShadersInclude/" + filesToLoad[index] + ".fx";
-//         }
-//     } else if (kind === "shaders") {
-//         for (var index = 0; index < filesToLoad.length; index++) {
-//             var name = filesToLoad[index];
-//             filesToLoad[index] = "../../src/Shaders/" + filesToLoad[index] + ".fx";
-//         }
-//     }
-
-//     return filesToLoad;
-// }
-
-// /*
-//  * Shader Management.
-//  */
-// function shadersName(filename) {
-//     return path.basename(filename)
-//         .replace(".fragment", "Pixel")
-//         .replace(".vertex", "Vertex")
-//         .replace(".fx", "Shader");
-// }
-
-// function includeShadersName(filename) {
-//     return path.basename(filename).replace(".fx", "");
-// }
-
-// /*
-//  * Main necessary files stream Management.
-//  */
-// gulp.task("includeShaders", function(cb) {
-//     var filesToProcess = determineFilesToProcess("shaderIncludes");
-//     includeShadersStream = gulp.src(filesToProcess).
-//         pipe(expect.real({ errorOnFailure: true }, filesToProcess)).
-//         pipe(uncommentShader()).
-//         pipe(srcToVariable({
-//             variableName: "BABYLON.Effect.IncludesShadersStore", asMap: true, namingCallback: includeShadersName
-//         }));
-//     cb();
-// });
-
-// gulp.task("shaders", gulp.series("includeShaders", function(cb) {
-//     var filesToProcess = determineFilesToProcess("shaders");
-//     shadersStream = gulp.src(filesToProcess).
-//         pipe(expect.real({ errorOnFailure: true }, filesToProcess)).
-//         pipe(uncommentShader()).
-//         pipe(srcToVariable({
-//             variableName: "BABYLON.Effect.ShadersStore", asMap: true, namingCallback: shadersName
-//         }));
-//     cb();
-// }));
-
-// gulp.task("build", gulp.series("shaders", function build() {
-//     var filesToProcess = determineFilesToProcess("files");
-//     var directFilesToProcess = determineFilesToProcess("directFiles");
-//     let mergedStreams = merge2(gulp.src(filesToProcess)
-//         .pipe(expect.real({ errorOnFailure: true }, filesToProcess)),
-//         shadersStream,
-//         includeShadersStream);
-//     if (directFilesToProcess.length) {
-//         mergedStreams.add(gulp.src(directFilesToProcess));
-//     }
-//     return merge2(
-//         mergedStreams
-//             .pipe(concat(config.build.noModuleFilename))
-//             .pipe(cleants())
-//             .pipe(replace(extendsSearchRegex, ""))
-//             .pipe(replace(decorateSearchRegex, ""))
-//             .pipe(addDecorateAndExtends())
-//             .pipe(gulp.dest(config.build.outputDirectory))
-//             .pipe(rename(config.build.filename))
-//             .pipe(addModuleExports("BABYLON", {
-//                 dependencies: config.build.dependencies
-//             }))
-//             .pipe(gulp.dest(config.build.outputDirectory))
-//             .pipe(rename(config.build.minFilename))
-//             .pipe(uglify())
-//             .pipe(optimisejs())
-//             .pipe(gulp.dest(config.build.outputDirectory)),
-//         mergedStreams
-//             .pipe(concat("es6.js"))
-//             .pipe(cleants())
-//             .pipe(replace(extendsSearchRegex, ""))
-//             .pipe(replace(decorateSearchRegex, ""))
-//             .pipe(addES6Exports("BABYLON"))
-//             .pipe(gulp.dest(config.build.outputDirectory))
-//     );
-// }));
-
-// /*
-//  * Compiles all typescript files and creating a js and a declaration file.
-//  */
-// gulp.task("typescript-compile", function() {
-//     const dtsFilter = filter(['**', '!**/*.d.ts'], {restore: false});
-//     var tsResult = gulp.src(config.typescript)
-//         .pipe(dtsFilter)
-//         .pipe(sourcemaps.init())
-//         .pipe(tsProject({
-//             summarizeFailureOutput: true
-//         }));
-
-//     tsResult.once("error", function(err) {
-//         tsResult.once("finish", function() {
-//             console.log("Typescript compile failed");
-//             console.error(err);
-//             process.exit(1);
-//         });
-//     });
-
-//     return merge2([
-//         tsResult.dts
-//             .pipe(concat(config.build.declarationFilename))
-//             .pipe(addDtsExport("BABYLON", "babylonjs"))
-//             .pipe(gulp.dest(config.build.outputDirectory)),
-//         tsResult.js
-//             .pipe(sourcemaps.write("./",
-//                 {
-//                     includeContent: false,
-//                     sourceRoot: (filePath) => {
-//                         return "";
-//                     }
-//                 }))
-//             .pipe(gulp.dest(config.build.srcOutputDirectory))
-//     ])
-// });
-
 /**
  * Build the releasable files.
  * Back Compat Only, now name core as it is a lib

+ 0 - 58
Tools/Gulp/helpers/gulp-addDtsExport.js

@@ -1,58 +0,0 @@
-var gutil = require('gulp-util');
-var through = require('through2');
-
-module.exports = function (varName, moduleName, subModule, extendsRoot, dependencies) {
-    return through.obj(function (file, enc, cb) {
-
-        let exportText = "BABYLON";
-        if (subModule && !extendsRoot) {
-            exportText += '.' + varName.name;
-        }
-
-        let referenceText = '';
-        if (subModule) {
-            //referenceText = '/// <reference types="babylonjs"/>\n';
-        }
-
-        if (dependencies) {
-            referenceText = '';
-            dependencies.forEach(element => {
-                // was "babylonjs/${element}""
-                referenceText += `/// <reference types="${element}"/>
-`;
-            });
-        }
-
-        var moduleExportsAddition =
-            `${referenceText}
-
-declare module '${moduleName}' { 
-    export = ${exportText}; 
-}
-`;
-
-        //'export = ' + (subModule ? 'BABYLON.' : '') + varName + ';\n';// +
-        //'export as namespace ' + varName + ';\n\n';
-
-
-        if (file.isNull()) {
-            cb(null, file);
-            return;
-        }
-
-        if (file.isStream()) {
-            //streams not supported, no need for now.
-            return;
-        }
-
-        try {
-            file.contents = Buffer.from(moduleExportsAddition + String(file.contents));
-            this.push(file);
-
-        } catch (err) {
-            this.emit('error', new gutil.PluginError('gulp-add-module-exports', err, { fileName: file.path }));
-        }
-        cb();
-    });
-};
-

+ 0 - 89
Tools/Gulp/helpers/gulp-addES6Exports.js

@@ -1,89 +0,0 @@
-var gutil = require('gulp-util');
-var through = require('through2');
-
-/**
- * The parameters for this function has grown during development.
- * Eventually, this function will need to be reorganized. 
- */
-module.exports = function (baseModule, subModule, extendsRoot, externalUsingBabylon) {
-    return through.obj(function (file, enc, cb) {
-
-        var optionalRequire = `var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this);
-var babylonDependency = (globalObject && globalObject.BABYLON) || BABYLON || (typeof require !== 'undefined' && require("babylonjs"));
-var BABYLON = babylonDependency;
-`;
-        let fileContent = file.contents.toString();
-        function moduleExportAddition(varName) {
-
-            let base = subModule ? 'BABYLON' : baseModule;
-
-            let sadGlobalPolution = (!subModule) ? `var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : this);
-globalObject["${base}"] = ${base}${(subModule && !extendsRoot) ? '.' + varName : ''};` : '';
-            /*if (extendsRoot) {
-                basicInit = `__extends(root["BABYLON"], factory()); `
-            }*/
-
-            let listOfExports = [];
-            // find the exported members. es6 exports can NOT be generated dynamically.
-            let matcher = new RegExp(base + "\\.(\\w*) = (\\w*);", "g");
-            let match = matcher.exec(fileContent);
-            while (match != null) {
-                if (match[1] && match[2] && match[1] === match[2]) {
-                    listOfExports.push(match[1]);
-                }
-                match = matcher.exec(fileContent);
-            }
-
-            let enumMatcher = new RegExp(`\\(${base}\\.([A-Za-z0-9].*)= {}\\)`, "g");
-            let enumMatch = enumMatcher.exec(fileContent);
-            while (enumMatch != null) {
-                if (enumMatch[1] && listOfExports.indexOf(enumMatch[1]) === -1) {
-                    listOfExports.push(enumMatch[1]);
-                }
-                enumMatch = enumMatcher.exec(fileContent);
-            }
-
-
-            let exportsText = '';
-            listOfExports.forEach(cls => {
-                exportsText += `var ${cls} = ${base}.${cls};`;
-            });
-            exportsText += `
-export { ${listOfExports.join(",")} };`
-
-            return `${sadGlobalPolution}
-${exportsText}
-`;
-        }
-
-        var extendsAddition = `var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
-`;
-
-        var decorateAddition = 'var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};\n';
-
-
-        if (file.isNull()) {
-            cb(null, file);
-            return;
-        }
-
-        if (file.isStream()) {
-            //streams not supported, no need for now.
-            return;
-        }
-
-        try {
-            if (externalUsingBabylon) {
-                //file.contents = new Buffer(optionalRequire.concat(String(file.contents)));
-                file.contents = Buffer.from(optionalRequire.concat(Buffer.from(String(file.contents).concat(moduleExportAddition(baseModule)))));
-            } else {
-                let pretext = subModule ? optionalRequire : '';
-                file.contents = Buffer.from(pretext.concat(decorateAddition).concat(Buffer.from(extendsAddition.concat(String(file.contents)).concat(moduleExportAddition(baseModule)))));
-            }
-            this.push(file);
-        } catch (err) {
-            this.emit('error', new gutil.PluginError('gulp-add-module-exports', err, { fileName: file.path }));
-        }
-        cb();
-    });
-};

+ 2 - 2
Tools/Gulp/helpers/gulp-addModuleExports.js

@@ -1,5 +1,5 @@
-var gutil = require('gulp-util');
 var through = require('through2');
+var PluginError = require('plugin-error');
 
 /**
  * The parameters for this function has grown during development.
@@ -106,7 +106,7 @@ if(typeof earcut !== 'undefined') {
             }*/
             this.push(file);
         } catch (err) {
-            this.emit('error', new gutil.PluginError('gulp-add-module-exports', err, { fileName: file.path }));
+            this.emit('error', new PluginError('gulp-add-module-exports', err, { fileName: file.path }));
         }
         cb();
     });

+ 0 - 80
Tools/Gulp/helpers/gulp-calculateDependencies.js

@@ -1,80 +0,0 @@
-var gutil = require('gulp-util');
-var through = require('through2');
-var path = require('path');
-
-module.exports = function (moduleName, perFile, declared, depTree) {
-    return through.obj(function (file, enc, cb) {
-        let basename = (path.basename(file.path, ".ts"));
-        depTree[basename] = depTree[basename] || [];
-        // detect dependencies
-        let depReg1 = /[:,][ ]{0,1}([A-Z]\w*)/g;
-        let depReg2 = /<([A-Z]\w*)(\[\]){0,1}>/g;
-        let depReg3 = /[\s(]([A-Z]\w*)\./g;
-        let depReg4 = /[extends|implements] ([A-Z]\w*)/g;
-        let depReg5 = /new ([A-Z]\w*)/g;
-
-        let dependencies = [];
-        fileContent = file.contents.toString().replace(/(\/\*([\s\S]*?)\*\/)|(\/\/(.*)$)/gm, "");
-        function findWhereDeclared(objectName) {
-            let fileLocator;
-            Object.keys(perFile).some((filename => {
-                filedec = perFile[filename];
-                if (filedec.declarations.indexOf(objectName) !== -1) {
-                    fileLocator = filename;
-                    return true;
-                }
-                return false;
-            }))
-            return fileLocator;
-        }
-
-        //if (basename === "babylon.webVRCamera") {
-        [depReg4, depReg1, depReg5, depReg3, depReg2].forEach((reg, idx) => {
-            var match = reg.exec(fileContent);
-            while (match != null) {
-                if (match[1]) {
-                    let dep = match[1];
-                    if (basename === "babylon.poseEnabledController") {
-                        console.log(dep, idx);
-                    }
-                    //find if it is declared internally
-                    if (perFile[basename].declarations.indexOf(dep) === -1) {
-                        // not internally? maybe it is in core?
-                        //if (declared.core.indexOf(dep) === -1) {
-                        // seems like a legit dependency! was it already added?
-                        if (perFile[basename].dependencies.indexOf(dep) === -1) {
-                            //no! add it.
-                            let whereDeclared = (findWhereDeclared(dep));
-                            if (whereDeclared) {
-                                perFile[basename].dependencies.push(dep);
-                                if (basename === "babylon.poseEnabledController") {
-                                    console.log("adding ", dep, idx === 2);
-                                }
-                                depTree[basename].push({
-                                    name: dep,
-                                    file: whereDeclared,
-                                    module: perFile[whereDeclared].module,
-                                    main: idx === 0, // is it a main import
-                                    newDec: idx === 2 // is it "new"
-                                });
-                            }
-                        }
-                        //}
-                    }
-                }
-                match = reg.exec(fileContent);
-            }
-        });
-        //}
-
-
-        try {
-            this.push(file);
-
-        } catch (err) {
-            this.emit('error', new gutil.PluginError('gulp-calculateDependencies', err, { fileName: file.path }));
-        }
-        cb();
-    });
-};
-

+ 0 - 37
Tools/Gulp/helpers/gulp-decorateAndExtends.js

@@ -1,37 +0,0 @@
-var gutil = require('gulp-util');
-var through = require('through2');
-
-/**
- * The parameters for this function has grown during development.
- * Eventually, this function will need to be reorganized. 
- */
-//  subModule, extendsRoot, externalUsingBabylon, noBabylonInit
-module.exports = function (varName, config) {
-    return through.obj(function (file, enc, cb) {
-
-        var extendsAddition =
-            `var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function r(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();
-`;
-
-        var decorateAddition = `var __decorate=this&&this.__decorate||function(e,t,r,c){var o,f=arguments.length,n=f<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,r):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(n=(f<3?o(n):f>3?o(t,r,n):o(t,r))||n);return f>3&&n&&Object.defineProperty(t,r,n),n};
-`;
-
-        if (file.isNull()) {
-            cb(null, file);
-            return;
-        }
-
-        if (file.isStream()) {
-            //streams not supported, no need for now.
-            return;
-        }
-
-        try {
-            file.contents = Buffer.from(decorateAddition.concat(extendsAddition).concat(file.contents));
-            this.push(file);
-        } catch (err) {
-            this.emit('error', new gutil.PluginError('gulp-decorate-and-extends', err, { fileName: file.path }));
-        }
-        cb();
-    });
-};

+ 21 - 3
Tools/Gulp/helpers/gulp-processShaders.js

@@ -1,8 +1,12 @@
+// Dependencies.
 var through = require('through2');
-var PluginError = require('gulp-util').PluginError;
+var PluginError = require('plugin-error');
 let path = require('path');
 let fs = require('fs');
 
+/**
+ * Template creating hidden ts file containing the shaders.
+ */
 let tsShaderTemplate = 
 `import { Effect } from "babylonjs";
 ##INCLUDES_PLACEHOLDER##
@@ -14,6 +18,10 @@ Effect.##SHADERSTORE_PLACEHOLDER##[name] = shader;
 export { shader, name };
 `;
 
+
+/**
+ * Get the shaders name from their path.
+ */
 function getShaderName(filename) {
     let parts = filename.split('.');
     if (parts[1] !== 'fx') {
@@ -23,6 +31,9 @@ function getShaderName(filename) {
     }
 }
 
+/**
+ * Get the shaders included in the current one to generate to proper imports.
+ */
 function getIncludes(sourceCode) {
     var regex = /#include<(.+)>(\((.*)\))*(\[(.*)\])*/g;
     var match = regex.exec(sourceCode);
@@ -55,6 +66,9 @@ function getIncludes(sourceCode) {
     return includes;
 }
 
+/**
+ * Generate a ts file per shader file.
+ */
 function main(isCore) {
     return through.obj(function (file, enc, cb) {
             if (file.isNull()) {
@@ -70,11 +84,12 @@ function main(isCore) {
             const directory = path.dirname(normalized);
             const shaderName = getShaderName(filename);
             const tsFilename = filename.replace('.fx', '.ts');
-
             let fxData = file.contents.toString();
-            // Trailing whitespace...
+
+            // Remove Trailing whitespace...
             fxData = fxData.replace(/[^\S\r\n]+$/gm, "");
 
+            // Generate imports for includes.
             let includeText = "";
             const includes = getIncludes(fxData);
             includes.forEach((entry) => {
@@ -88,13 +103,16 @@ function main(isCore) {
                 }
             });
 
+            // Chose shader store.
             const shaderStore = directory.indexOf("ShadersInclude") > -1 ? "IncludesShadersStore" : "ShadersStore";
 
+            // Fill template in.
             let tsContent = tsShaderTemplate.replace('##INCLUDES_PLACEHOLDER##', includeText);
             tsContent = tsContent.replace('##NAME_PLACEHOLDER##', shaderName);
             tsContent = tsContent.replace('##SHADER_PLACEHOLDER##', fxData);
             tsContent = tsContent.replace('##SHADERSTORE_PLACEHOLDER##', shaderStore);
 
+            // Go to disk.
             fs.writeFileSync(directory + '/' + tsFilename, tsContent);
 
             return cb();

+ 1 - 1
Tools/Gulp/helpers/gulp-removeShaderComments.js

@@ -1,7 +1,7 @@
 'use strict';
 
 var through = require('through2');
-var PluginError = require('gulp-util').PluginError;
+var PluginError = require('plugin-error');
 var singleComment = 1;
 var multiComment = 2;
 

+ 1 - 1
Tools/Gulp/helpers/gulp-rmDir.js

@@ -24,7 +24,7 @@ var rmDir = function(dirPath) {
 }
 
 module.exports = function(dirPath) {
-    // Retry cause  sometimes locked on my mac :-)
+    // Retry cause sometimes locked on my mac :-)
     try {
         rmDir(dirPath);
     }

+ 0 - 1
Tools/Gulp/helpers/gulp-validateTypedoc.js

@@ -2,7 +2,6 @@
 
 var fs = require('fs');
 var Vinyl = require('vinyl');
-var path = require('path');
 var through = require('through2');
 var PluginError = require('plugin-error');
 var supportsColor = require('color-support');

+ 15 - 15
Tools/Gulp/tasks/gulpTasks-whatsNew.js

@@ -6,23 +6,23 @@ var fs = require("fs");
  * Tests the whats new file to ensure changes have been made in the PR.
  */
 gulp.task("tests-whatsnew", function(done) {
-    // // Only checks on Travis
-    // if (!process.env.TRAVIS) {
-    //     done();
-    //     return;
-    // }
+    // Only checks on Travis
+    if (!process.env.TRAVIS) {
+        done();
+        return;
+    }
 
-    // // Only checks on Pull Requests
-    // if (process.env.TRAVIS_PULL_REQUEST == "false") {
-    //     done();
-    //     return;
-    // }
+    // Only checks on Pull Requests
+    if (process.env.TRAVIS_PULL_REQUEST == "false") {
+        done();
+        return;
+    }
 
-    // // Do not check deploy
-    // if (process.env.TRAVIS_BRANCH == "preview") {
-    //     done();
-    //     return;
-    // }
+    // Do not check deploy
+    if (process.env.TRAVIS_BRANCH == "preview") {
+        done();
+        return;
+    }
 
     // Compare what's new with the current one in the preview release folder.
     const https = require("https");

+ 2 - 8
package.json

@@ -61,22 +61,16 @@
         "chai": "^4.1.2",
         "color-support": "^1.1.3",
         "del": "3.0.0",
-        "glob": "^7.1.3",
         "gulp": "^4.0.0",
-        "gulp-clean-ts-extends": "~0.1.1",
         "gulp-concat": "~2.6.1",
-        "gulp-content-to-variable": "^0.1.0",
         "gulp-debug": "^4.0.0",
-        "gulp-expect-file": "^1.0.0",
         "gulp-filter": "^5.1.0",
         "gulp-optimize-js": "^1.1.0",
         "gulp-rename": "^1.4.0",
         "gulp-replace": "~1.0.0",
-        "gulp-sourcemaps": "~2.6.4",
         "gulp-tslint": "^8.1.3",
         "gulp-typedoc": "^2.2.0",
         "gulp-typescript": "4.0.2",
-        "gulp-uglify": "^3.0.1",
         "gulp-webserver": "^0.9.1",
         "karma": "^2.0.5",
         "karma-browserstack-launcher": "^1.3.0",
@@ -96,9 +90,9 @@
         "typedoc": "^0.12.0",
         "webpack-stream": "5.0.0",
         "dts-bundle": "^0.7.3",
-        "gulp-clean": "^0.4.0",
         "fs-extra": "^5.0.0",
         "prompt": "^1.0.0",
-        "shelljs": "^0.7.8"
+        "shelljs": "^0.7.8",
+        "plugin-error": "^1.0.1"
     }
 }