From fea6904d4621df360f556ac73e9a87fdd6eeb7ea Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Mon, 7 Oct 2013 17:18:11 -0400 Subject: [PATCH] Edit bower install script based on comments. Close gh-1392. --- build/bower-install.js | 16 +++------------- package.json | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/build/bower-install.js b/build/bower-install.js index fefcfc065..f83fdf51f 100644 --- a/build/bower-install.js +++ b/build/bower-install.js @@ -1,5 +1,4 @@ -var installer, - which = require( "which" ), +var which = require( "which" ), spawn = require( "child_process" ).spawn; try { @@ -8,16 +7,7 @@ try { console.error( "Bower must be installed to build jQuery." ); console.error( "Please install Bower by running the following command:" ); console.error( "npm install -g bower" ); - process.exit( 1 ); + process.exit( 0 ); } -installer = spawn( "bower", [ "install" ] ); -installer.stdout.on( "data", function( data ) { - console.log( data ); -}); -installer.stderr.on( "data", function( data ) { - console.error( data ); -}); -installer.on( "close", function( code ) { - process.exit( code ); -}); +spawn( "bower", [ "install" ], { stdio: 'inherit' } ); diff --git a/package.json b/package.json index 6da6ab4f5..27fe45e2f 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "which": "~1.0.5" }, "scripts": { - "install": "bower install", + "install": "node build/bower-install", "test": "grunt" } } -- 2.39.5