|
@@ -1,12 +1,12 @@
|
|
|
-const path = require( 'path' );
|
|
|
-const fs = require( 'fs' );
|
|
|
+var path = require( 'path' );
|
|
|
+var fs = require( 'fs' );
|
|
|
|
|
|
// Creates an rollup config object for the given file to
|
|
|
// be output to umd format
|
|
|
function createOutput( file ) {
|
|
|
|
|
|
- const inputPath = path.resolve( file );
|
|
|
- const outputPath = inputPath.replace( /[\\\/]examples[\\\/]jsm[\\\/]/, '/examples/js/' );
|
|
|
+ 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
|
|
@@ -42,11 +42,11 @@ function createOutput( file ) {
|
|
|
// the callback for every file.
|
|
|
function walk( dir, cb ) {
|
|
|
|
|
|
- const files = fs.readdirSync( dir );
|
|
|
+ var files = fs.readdirSync( dir );
|
|
|
files.forEach( f => {
|
|
|
|
|
|
- const p = path.join( dir, f );
|
|
|
- const stats = fs.statSync( p );
|
|
|
+ var p = path.join( dir, f );
|
|
|
+ var stats = fs.statSync( p );
|
|
|
if ( stats.isDirectory() ) {
|
|
|
|
|
|
walk( p, cb );
|
|
@@ -62,7 +62,7 @@ function walk( dir, cb ) {
|
|
|
}
|
|
|
|
|
|
// Gather up all the files
|
|
|
-const files = [];
|
|
|
+var files = [];
|
|
|
walk( 'examples/jsm/', p => files.push( p ) );
|
|
|
|
|
|
// Create a rollup config for each module.js file
|