sebastien 6 лет назад
Родитель
Сommit
d0c78e02ef

+ 54 - 30
Tools/Gulp/config.json

@@ -1511,7 +1511,6 @@
                 "bundle": "true",
                 "babylonIncluded": false,
                 "useOutputForDebugging": true,
-                "preventLoadLibrary": true,
                 "isMain": true
             },
             {
@@ -1521,7 +1520,8 @@
                 "entry": "./legacy/legacy-cell.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1530,7 +1530,8 @@
                 "entry": "./legacy/legacy-custom.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1539,7 +1540,8 @@
                 "entry": "./legacy/legacy-fire.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1548,7 +1550,8 @@
                 "entry": "./legacy/legacy-fur.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1557,7 +1560,8 @@
                 "entry": "./legacy/legacy-gradient.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1566,7 +1570,8 @@
                 "entry": "./legacy/legacy-grid.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1575,7 +1580,8 @@
                 "entry": "./legacy/legacy-lava.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1584,7 +1590,8 @@
                 "entry": "./legacy/legacy-mix.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1593,7 +1600,8 @@
                 "entry": "./legacy/legacy-normal.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1602,7 +1610,8 @@
                 "entry": "./legacy/legacy-shadowOnly.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1611,7 +1620,8 @@
                 "entry": "./legacy/legacy-simple.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1620,7 +1630,8 @@
                 "entry": "./legacy/legacy-sky.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1629,7 +1640,8 @@
                 "entry": "./legacy/legacy-terrain.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1638,7 +1650,8 @@
                 "entry": "./legacy/legacy-triPlanar.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "noBundleInName": true,
@@ -1647,7 +1660,8 @@
                 "entry": "./legacy/legacy-water.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             }
         ],
         "build": {
@@ -1685,7 +1699,6 @@
                 "bundle": "true",
                 "babylonIncluded": false,
                 "useOutputForDebugging": true,
-                "preventLoadLibrary": true,
                 "isMain": true
             },
             {
@@ -1696,7 +1709,8 @@
                 "entry": "./legacy/legacy-asciiArt.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1706,7 +1720,8 @@
                 "entry": "./legacy/legacy-digitalRain.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             }
         ],
         "build": {
@@ -1744,7 +1759,6 @@
                 "bundle": "true",
                 "babylonIncluded": false,
                 "useOutputForDebugging": true,
-                "preventLoadLibrary": true,
                 "isMain": true
             },
             {
@@ -1755,7 +1769,8 @@
                 "entry": "./legacy/legacy-brick.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1765,7 +1780,8 @@
                 "entry": "./legacy/legacy-cloud.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1775,7 +1791,8 @@
                 "entry": "./legacy/legacy-fire.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1785,7 +1802,8 @@
                 "entry": "./legacy/legacy-grass.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1795,7 +1813,8 @@
                 "entry": "./legacy/legacy-marble.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1805,7 +1824,8 @@
                 "entry": "./legacy/legacy-normalMap.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1815,7 +1835,8 @@
                 "entry": "./legacy/legacy-perlinNoise.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1825,7 +1846,8 @@
                 "entry": "./legacy/legacy-road.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1835,7 +1857,8 @@
                 "entry": "./legacy/legacy-starfield.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             },
             {
                 "files": [],
@@ -1845,7 +1868,8 @@
                 "entry": "./legacy/legacy-wood.ts",
                 "bundle": "true",
                 "babylonIncluded": false,
-                "useOutputForDebugging": true
+                "useOutputForDebugging": true,
+                "preventLoadLibrary": true
             }
         ],
         "build": {

+ 45 - 31
Tools/Gulp/gulpfile.js

@@ -772,36 +772,50 @@ gulp.task("watch", gulp.series("srcTscWatch", function startWatch() {
     var tasks = [];
 
     config.modules.map(function(module) {
-
-        config[module].libraries.map(function(library) {
-            if (library.webpack) {
-                if (library.noWatch) return;
-                var outputDirectory = config.build.tempDirectory + config[module].build.distOutputDirectory;
-                let wpconfig = require(library.webpack);
-                wpconfig.watch = true;
-                // dev mode and absolute path sourcemaps for debugging
-                wpconfig.mode = "development";
-                wpconfig.output.devtoolModuleFilenameTemplate = "[absolute-resource-path]";
-                //config.stats = "minimal";
-                tasks.push(webpackStream(wpconfig, webpack).pipe(gulp.dest(outputDirectory)))
-            } else {
-                tasks.push(gulp.watch(library.files, { interval: interval }, function() {
-                    console.log(library.output);
-                    return buildExternalLibrary(library, config[module], true)
-                        .pipe(debug());
-                }));
-                tasks.push(gulp.watch(library.shaderFiles, { interval: interval }, function() {
-                    console.log(library.output);
-                    return buildExternalLibrary(library, config[module], true)
-                        .pipe(debug())
-                }));
-                tasks.push(gulp.watch(library.sassFiles, { interval: interval }, function() {
-                    console.log(library.output);
-                    return buildExternalLibrary(library, config[module], true)
-                        .pipe(debug())
-                }));
-            }
-        });
+        if (config[module].build && config[module].build.webpack) {
+            var library = config[module].libraries[0];
+            if (library.noWatch) return;
+            var outputDirectory = config.build.tempDirectory + config[module].build.distOutputDirectory;
+            let wpconfig = require(config[module].build.webpack);
+            wpconfig.watch = true;
+            // dev mode and absolute path sourcemaps for debugging
+            wpconfig.mode = "development";
+            wpconfig.output.devtoolModuleFilenameTemplate = "[absolute-resource-path]";
+            //config.stats = "minimal";
+            tasks.push(webpackStream(wpconfig, webpack).pipe(gulp.dest(outputDirectory)))
+        }
+        else {
+            // Soon To Be Gone
+            config[module].libraries.map(function(library) {
+                if (library.webpack) {
+                    if (library.noWatch) return;
+                    var outputDirectory = config.build.tempDirectory + config[module].build.distOutputDirectory;
+                    let wpconfig = require(library.webpack);
+                    wpconfig.watch = true;
+                    // dev mode and absolute path sourcemaps for debugging
+                    wpconfig.mode = "development";
+                    wpconfig.output.devtoolModuleFilenameTemplate = "[absolute-resource-path]";
+                    //config.stats = "minimal";
+                    tasks.push(webpackStream(wpconfig, webpack).pipe(gulp.dest(outputDirectory)))
+                } else {
+                    tasks.push(gulp.watch(library.files, { interval: interval }, function() {
+                        console.log(library.output);
+                        return buildExternalLibrary(library, config[module], true)
+                            .pipe(debug());
+                    }));
+                    tasks.push(gulp.watch(library.shaderFiles, { interval: interval }, function() {
+                        console.log(library.output);
+                        return buildExternalLibrary(library, config[module], true)
+                            .pipe(debug())
+                    }));
+                    tasks.push(gulp.watch(library.sassFiles, { interval: interval }, function() {
+                        console.log(library.output);
+                        return buildExternalLibrary(library, config[module], true)
+                            .pipe(debug())
+                    }));
+                }
+            });
+        }
     });
 
     console.log(tasks.length);
@@ -1498,4 +1512,4 @@ gulp.task("typescript-all", gulp.series("typescript", "typescript-libraries", "n
 /**
  * The default task, concat and min the main BJS files.
  */
-gulp.task("default", gulp.series("tsLint", "typescript-all", "intellisense", "typedoc-all", "tests-unit", "tests-modules", "tests-validation-virtualscreen", "tests-validation-browserstack"));
+gulp.task("default", gulp.series("tsLint", "typescript-all", "intellisense", "tests-unit", "tests-modules", "tests-validation-virtualscreen", "tests-validation-browserstack"));

+ 1 - 1
materialsLibrary/webpack.config.js

@@ -10,7 +10,7 @@ module.exports = {
     },
     output: {
         path: path.resolve(__dirname, '../dist/preview release/materialsLibrary'),
-        filename: 'babylon.materials.min.js',
+        filename: 'babylonjs.materials.min.js',
         libraryTarget: 'umd',
         library: {
             root: ["MATLIB"],

+ 1 - 1
postProcessLibrary/webpack.config.js

@@ -10,7 +10,7 @@ module.exports = {
     },
     output: {
         path: path.resolve(__dirname, '../dist/preview release/postProcessLibrary'),
-        filename: 'babylon.postProcesses.min.js',
+        filename: 'babylonjs.postProcess.min.js',
         libraryTarget: 'umd',
         library: {
             root: ["POSTPROCESSLIBRARY"],

+ 1 - 1
proceduralTexturesLibrary/webpack.config.js

@@ -10,7 +10,7 @@ module.exports = {
     },
     output: {
         path: path.resolve(__dirname, '../dist/preview release/gui'),
-        filename: 'babylon.proceduralTextures.min.js',
+        filename: 'babylonjs.proceduralTextures.min.js',
         libraryTarget: 'umd',
         library: {
             root: ["PROCEDURALTEXTURESLIB"],