Browse Source

Build: Generate three.cjs from rollup.

Mr.doob 3 years ago
parent
commit
1625f32ba1
3 changed files with 28 additions and 795 deletions
  1. 21 793
      package-lock.json
  2. 1 2
      package.json
  3. 6 0
      utils/build/rollup.config.js

File diff suppressed because it is too large
+ 21 - 793
package-lock.json


+ 1 - 2
package.json

@@ -83,7 +83,7 @@
   "scripts": {
     "start": "npm run dev",
     "test": "npm run lint && npm run test-unit",
-    "build": "rollup -c utils/build/rollup.config.js && cpy ./build/three.js ./build/ --rename=three.cjs",
+    "build": "rollup -c utils/build/rollup.config.js",
     "build-module": "ONLY_MODULE=true rollup -c utils/build/rollup.config.js",
     "build-examples": "rollup -c utils/build/rollup.examples.config.js && echo '\nFormatting...' && eslint examples/js --ext js --ignore-pattern libs --ignore-pattern ifc --fix",
     "dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -w -m inline\" \"servez -p 8080\"",
@@ -129,7 +129,6 @@
     "@rollup/plugin-node-resolve": "^13.0.5",
     "chalk": "^4.1.2",
     "concurrently": "^6.2.2",
-    "cpy-cli": "^3.1.1",
     "eslint": "^7.32.0",
     "eslint-config-mdcs": "^5.0.0",
     "eslint-plugin-html": "^6.2.0",

+ 6 - 0
utils/build/rollup.config.js

@@ -318,6 +318,12 @@ let builds = [
 				name: 'THREE',
 				file: 'build/three.js',
 				indent: '\t'
+			},
+			{
+				format: 'umd',
+				name: 'THREE',
+				file: 'build/three.cjs',
+				indent: '\t'
 			}
 		]
 	},

Some files were not shown because too many files changed in this diff