فهرست منبع

Merge pull request #18967 from Mugen87/dev47

Remove "npm run build-examples".
Mr.doob 5 سال پیش
والد
کامیت
202ee79d3a
2فایلهای تغییر یافته به همراه0 افزوده شده و 86 حذف شده
  1. 0 1
      package.json
  2. 0 85
      utils/build/rollup-examples.config.js

+ 0 - 1
package.json

@@ -48,7 +48,6 @@
     "start": "npm run dev",
     "build": "rollup -c utils/build/rollup.config.js",
     "build-closure": "rollup -c utils/build/rollup.config.js && google-closure-compiler --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 utils/build/rollup-examples.config.js",
     "dev": "concurrently --names \"ROLLUP,HTTP\" -c \"bgBlue.bold,bgGreen.bold\" \"rollup -c utils/build/rollup.config.js -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 utils/build/rollup.config.js -w -m inline\" \"rollup -c test/rollup.unit.config.js -w -m inline\" \"http-server -p 8080\"",
     "lint-docs": "eslint docs --ext html",

+ 0 - 85
utils/build/rollup-examples.config.js

@@ -1,85 +0,0 @@
-var path = require( 'path' );
-var fs = require( 'fs' );
-
-// Creates a rollup config object for the given file to
-// be converted to umd
-function createOutput( file ) {
-
-	var inputPath = path.resolve( file );
-	var 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
-	// replicate the existing behavior.
-	return {
-
-		input: inputPath,
-		treeshake: false,
-		external: p => p !== inputPath,
-
-		plugins: [ {
-
-			generateBundle: function ( options, bundle ) {
-
-				for ( var key in bundle ) {
-
-					bundle[ key ].code = bundle[ key ].code.replace( /three_module_js/g, 'THREE' );
-
-				}
-
-			}
-
-		} ],
-
-		output: {
-
-			format: 'umd',
-			name: 'THREE',
-			file: outputPath,
-
-			globals: () => 'THREE',
-			paths: p => /three\.module\.js$/.test( p ) ? 'three' : p,
-			extend: true,
-
-			banner:
-				'/**\n' +
-				` * Generated from '${ path.relative( '.', inputPath ).replace( /\\/g, '/' ) }'\n` +
-				' */\n',
-			esModule: false
-
-		}
-
-	};
-
-}
-
-// Walk the file structure starting at the given directory and fire
-// the callback for every js file.
-function walk( dir, cb ) {
-
-	var files = fs.readdirSync( dir );
-	files.forEach( f => {
-
-		var p = path.join( dir, f );
-		var stats = fs.statSync( p );
-
-		if ( stats.isDirectory() ) {
-
-			walk( p, cb );
-
-		} else if ( f.endsWith( '.js' ) ) {
-
-			cb( p );
-
-		}
-
-	} );
-
-}
-
-// Gather up all the files
-var files = [];
-walk( 'examples/jsm/', p => files.push( p ) );
-
-// Create a rollup config for each module.js file
-export default files.map( p => createOutput( p ) );