From 2851808e13b6ade2dda2a62f00ee4dfb04edf19c Mon Sep 17 00:00:00 2001 From: kovacsv Date: Tue, 9 Nov 2021 07:15:53 +0100 Subject: [PATCH] Add automatic fflate installer. --- package.json | 1 + tools/updatelibs.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/package.json b/package.json index 7956605..769f987 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "svg": "node tools/run_python.js tools/svg.py" }, "dependencies": { + "fflate": "0.7.1", "rhino3dm": "7.7.0", "three": "0.134.0" }, diff --git a/tools/updatelibs.py b/tools/updatelibs.py index 86070de..a72306e 100644 --- a/tools/updatelibs.py +++ b/tools/updatelibs.py @@ -9,6 +9,7 @@ import urllib.request from lib import tools_lib as Tools threeJsFileMap = [ + [os.path.join ('three', 'LICENSE'), os.path.join ('three.license.md')], [os.path.join ('three', 'build', 'three.min.js'), os.path.join ('three.min.js')], [os.path.join ('three', 'examples', 'js', 'libs', 'chevrotain.min.js'), os.path.join ('three_loaders', 'chevrotain.min.js')], [os.path.join ('three', 'examples', 'js', 'loaders', '3MFLoader.js'), os.path.join ('three_loaders', '3MFLoader.js')], @@ -22,6 +23,11 @@ rhino3dmFileMap = [ [os.path.join ('rhino3dm', 'rhino3dm.wasm'), os.path.join ('loaders', 'rhino3dm.wasm')], ] +fflateFileMap = [ + [os.path.join ('fflate', 'LICENSE'), os.path.join ('loaders', 'fflate.license.md')], + [os.path.join ('fflate', 'umd', 'index.js'), os.path.join ('loaders', 'fflate.min.js')], +] + def PrintInfo (message): print ('INFO: ' + message) @@ -45,6 +51,7 @@ def Main (argv): UpdateModule (threeJsFileMap, nodeModulesDir, libsDir) UpdateModule (rhino3dmFileMap, nodeModulesDir, libsDir) + UpdateModule (fflateFileMap, nodeModulesDir, libsDir) return 0