]> source.dussan.org Git - jquery.git/commitdiff
Edit bower install script based on comments. Close gh-1392.
authorTimmy Willison <timmywillisn@gmail.com>
Mon, 7 Oct 2013 21:18:11 +0000 (17:18 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Mon, 7 Oct 2013 21:20:02 +0000 (17:20 -0400)
build/bower-install.js
package.json

index fefcfc065dc26d85b09726ede47b5ddc45a55cb2..f83fdf51f66dbc3a7eab1d71177acca8586d492f 100644 (file)
@@ -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' } );
index 8d58521b794459c4842cebcecf64948642b89bed..fb04545be299c879d1369dfcc647a4570f994b06 100644 (file)
@@ -42,7 +42,7 @@
                "which": "~1.0.5"
        },
        "scripts": {
-               "install": "bower install",
+               "install": "node build/bower-install",
                "test": "grunt"
        }
 }