Skip to content

Commit

Permalink
Build: Skip test files when generating build folders for packages (#6972
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gziolo committed May 28, 2018
1 parent a721b57 commit 931181f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ function buildFileFor( file, silent, environment ) {
*/
function buildPackage( packagePath ) {
const srcDir = path.resolve( packagePath, SRC_DIR );
const files = glob.sync( srcDir + '/**/*.js', { nodir: true } )
.filter( ( file ) => ! /\.test\.js/.test( file ) );
const files = glob.sync( `${ srcDir }/**/*.js`, {
ignore: `${ srcDir }/**/test/**/*.js`,
nodir: true,
} );

process.stdout.write( `${ path.basename( packagePath ) }\n` );

Expand Down

0 comments on commit 931181f

Please sign in to comment.