Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/packages/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const fs = require( 'fs' );
const watch = require( 'node-watch' );
const { execSync } = require( 'child_process' );
const { spawn } = require( 'child_process' );
const path = require( 'path' );
const chalk = require( 'chalk' );

Expand All @@ -12,7 +12,7 @@ const chalk = require( 'chalk' );
*/
const getPackages = require( './get-packages' );

const BUILD_CMD = `node \"${ path.resolve( __dirname, './build.js' ) }\"`;
const BUILD_SCRIPT = path.resolve( __dirname, './build.js' );

let filesToBuild = new Map();

Expand Down Expand Up @@ -69,7 +69,7 @@ setInterval( () => {
if ( files.length ) {
filesToBuild = new Map();
try {
execSync( `${ BUILD_CMD } \"${ files.join( ' ' ) }\"`, { stdio: [ 0, 1, 2 ] } );
spawn( 'node', [ BUILD_SCRIPT, ...files ], { stdio: [ 0, 1, 2 ] } );
} catch ( e ) {}
}
}, 100 );
Expand Down