فهرست منبع

Rollup-examples: Gather only js files (fixes crash when finding .DS_Store files).

Mr.doob 6 سال پیش
والد
کامیت
9602d77a67
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      rollup-examples.config.js

+ 4 - 4
rollup-examples.config.js

@@ -23,8 +23,8 @@ function createOutput( file ) {
 			name: 'THREE',
 			file: outputPath,
 
-            globals: () => 'THREE',
-            paths: p => /three\.module\.js$/.test( p ) ? 'three' : p,
+			globals: () => 'THREE',
+			paths: p => /three\.module\.js$/.test( p ) ? 'three' : p,
 			extend: true,
 
 			banner:
@@ -39,7 +39,7 @@ function createOutput( file ) {
 }
 
 // Walk the file structure starting at the given directory and fire
-// the callback for every file.
+// the callback for every js file.
 function walk( dir, cb ) {
 
 	var files = fs.readdirSync( dir );
@@ -51,7 +51,7 @@ function walk( dir, cb ) {
 
 			walk( p, cb );
 
-		} else {
+		} else if ( f.endsWith( '.js' ) ) {
 
 			cb( p );