Explorar o código

Clean useless iscore from gulp

sebavan %!s(int64=6) %!d(string=hai) anos
pai
achega
43e0b87fe5

+ 2 - 3
Tools/Gulp/tasks/gulpTasks-watchCore.js

@@ -24,7 +24,6 @@ var cleanShaders = function(settings) {
 gulp.task("watchCore", async function startWatch() {
     var module = "core";
     var settings = config[module].build;
-    var isCore = config[module].isCore;
     var library = config[module].libraries[0];
 
     // Clean shaders
@@ -33,7 +32,7 @@ gulp.task("watchCore", async function startWatch() {
     // Generate shaders.
     gulp.src(settings.srcDirectory + "**/*.fx")
         .pipe(uncommentShaders())
-        .pipe(processShaders(isCore))
+        .pipe(processShaders(true))
 
     // Clean Folder.
     rmDir('../../.temp/es6LocalDev/core');
@@ -58,6 +57,6 @@ gulp.task("watchCore", async function startWatch() {
         console.log(library.output + ": Shaders.");
         return gulp.src(settings.srcDirectory + "**/*.fx")
             .pipe(uncommentShaders())
-            .pipe(processShaders(isCore));
+            .pipe(processShaders(true));
     });
 });

+ 4 - 6
Tools/Gulp/tasks/gulpTasks-watchLibraries.js

@@ -17,8 +17,7 @@ gulp.task("watchLibraries", function startWatch() {
 
     config.modules.map(function(module) {
         var settings = config[module].build;
-        var isCore = config[module].isCore;
-        if (!isCore && settings && settings.webpack) {
+        if (!config[module].isCore && settings && settings.webpack) {
             for (var index = 0; index < config[module].libraries.length; index++) {
                 var library = config[module].libraries[index];
                 if (library.preventLoadLibrary) { 
@@ -34,7 +33,6 @@ gulp.task("watchLibraries", function startWatch() {
 
                 var rootPath = path.resolve(__dirname, "../../../");
                 var absoluteSrc = path.resolve(__dirname, "../", settings.srcDirectory);
-                var prefix = isCore ? "../" : "../../";
                 wpConfig.output.devtoolModuleFilenameTemplate = (info) => {
                     info.resourcePath = path.normalize(info.resourcePath);
 
@@ -42,13 +40,13 @@ gulp.task("watchLibraries", function startWatch() {
                         info.resourcePath = path.join(absoluteSrc, info.resourcePath);
                     }
 
-                    return `${prefix}${path.relative(rootPath, info.resourcePath).replace(/\\/g, "/")}`;
+                    return `"../../${path.relative(rootPath, info.resourcePath).replace(/\\/g, "/")}`;
                 };
 
                 tasks.push(
                     gulp.src(settings.srcDirectory + "**/*.fx")
                         .pipe(uncommentShaders())
-                        .pipe(processShaders(isCore))
+                        .pipe(processShaders(false))
                 );
 
                 var outputDirectory = config.build.tempDirectory + settings.distOutputDirectory;
@@ -61,7 +59,7 @@ gulp.task("watchLibraries", function startWatch() {
                         console.log(library.output + ": Shaders.");
                         return gulp.src(settings.srcDirectory + "**/*.fx")
                             .pipe(uncommentShaders())
-                            .pipe(processShaders(isCore));
+                            .pipe(processShaders(false));
                     })
                 );
             }