瀏覽代碼

Merge pull request #3655 from RaananW/fix-ser-build

Fix serialize-module build
David Catuhe 7 年之前
父節點
當前提交
976ae8d999
共有 3 個文件被更改,包括 12 次插入1 次删除
  1. 3 0
      Tools/Gulp/config.json
  2. 8 1
      Tools/Gulp/gulpfile.js
  3. 1 0
      dist/preview release/what's new.md

+ 3 - 0
Tools/Gulp/config.json

@@ -1516,6 +1516,9 @@
                     "../../serializers/src/glTF/2.0/babylon.glTFData.ts",
                     "../../serializers/src/glTF/2.0/babylon.glTFData.ts",
                     "../../serializers/src/glTF/2.0/babylon.glTFMaterial.ts"
                     "../../serializers/src/glTF/2.0/babylon.glTFMaterial.ts"
                 ],
                 ],
+                "extraDeclarations": [
+                    "../../dist/babylon.glTF2Interface.d.ts"
+                ],
                 "output": "babylon.glTF2Serializer.js"
                 "output": "babylon.glTF2Serializer.js"
             }
             }
         ],
         ],

+ 8 - 1
Tools/Gulp/gulpfile.js

@@ -405,7 +405,14 @@ var buildExternalLibrary = function (library, settings, watch) {
             .pipe(gulp.dest(outputDirectory));
             .pipe(gulp.dest(outputDirectory));
         /*}*/
         /*}*/
 
 
-        var dts = tsProcess.dts
+        let preDts;
+        if (library.extraDeclarations) {
+            preDts = merge2([tsProcess.dts, gulp.src(library.extraDeclarations)])
+        } else {
+            preDts = tsProcess.dts;
+        }
+
+        var dts = preDts
             .pipe(concat(library.output))
             .pipe(concat(library.output))
             .pipe(replace(referenceSearchRegex, ""))
             .pipe(replace(referenceSearchRegex, ""))
             .pipe(rename({ extname: ".d.ts" }))
             .pipe(rename({ extname: ".d.ts" }))

+ 1 - 0
dist/preview release/what's new.md

@@ -47,6 +47,7 @@
 - AssetContainer Class and loading methods. ([trevordev](https://github.com/trevordev))
 - AssetContainer Class and loading methods. ([trevordev](https://github.com/trevordev))
 - KeepAssets class and AssetContainer.moveAllFromScene ([HoloLite](http://www.html5gamedevs.com/profile/28694-hololite/), [trevordev](https://github.com/trevordev))
 - KeepAssets class and AssetContainer.moveAllFromScene ([HoloLite](http://www.html5gamedevs.com/profile/28694-hololite/), [trevordev](https://github.com/trevordev))
 - (Viewer) It is now possible to update parts of the configuration without rcreating the objects. ([RaananW](https://github.com/RaananW))
 - (Viewer) It is now possible to update parts of the configuration without rcreating the objects. ([RaananW](https://github.com/RaananW))
+- (Gulp) extra/external declarations can be prepended to final declarations during build. ([RaananW](https://github.com/RaananW))
 
 
 ## Bug fixes
 ## Bug fixes
 - `setPivotMatrix` ws not setting pivot correctly. This is now fixed. We also introduced a new `setPreTransformMatrix` to reproduce the sometimes needed behavior of the previous `setPivotMatrix` function ([deltakosh](https://github.com/deltakosh))
 - `setPivotMatrix` ws not setting pivot correctly. This is now fixed. We also introduced a new `setPreTransformMatrix` to reproduce the sometimes needed behavior of the previous `setPivotMatrix` function ([deltakosh](https://github.com/deltakosh))