ソースを参照

Fix rollup script, add build script to package.json

Garrett Johnson 6 年 前
コミット
e28c2269d6
2 ファイル変更2 行追加1 行削除
  1. 1 0
      package.json
  2. 1 1
      rollup-examples.config.js

+ 1 - 0
package.json

@@ -32,6 +32,7 @@
     "build": "rollup -c",
     "build-test": "rollup -c test/rollup.unit.config.js",
     "build-closure": "rollup -c && java -jar node_modules/google-closure-compiler-java/compiler.jar --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs utils/build/externs.js --language_in=ECMASCRIPT5_STRICT --js build/three.js --js_output_file build/three.min.js",
+    "build-examples": "rollup -c rollup-examples.config.js",
     "dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"http-server -c-1 -p 8080\"",
     "dev-test": "concurrently --names \"ROLLUP,ROLLUPTEST,HTTP\" -c \"bgBlue.bold,bgRed.bold,bgGreen.bold\" \"rollup -c -w -m inline\" \"rollup -c test/rollup.unit.config.js -w -m inline\" \"http-server -p 8080\"",
     "start": "npm run dev",

+ 1 - 1
rollup-examples.config.js

@@ -6,7 +6,7 @@ const fs = require( 'fs' );
 function createOutput( file ) {
 
 	const inputPath = path.resolve( file );
-	const outputPath = inputPath.replace( /[\\\/]examples[\\\/]modules[\\\/]/, '/examples/js/' );
+	const outputPath = inputPath.replace( /[\\\/]examples[\\\/]jsm[\\\/]/, '/examples/js/' );
 
 	// Every import is marked as external so the output is 1-to-1. We
 	// assume that that global object should be the THREE object so we