diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-10-05 14:28:54 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-10-07 17:19:58 -0400 |
commit | e9a36f3a34ca4a103a574119231ee9d3ea92b8d5 (patch) | |
tree | b6e427d21a8556ceee9cd8620a298ec4a1c6b343 /build | |
parent | 2ef0a17031e3a70e83f9e6e20b618979df711fef (diff) | |
download | jquery-e9a36f3a34ca4a103a574119231ee9d3ea92b8d5.tar.gz jquery-e9a36f3a34ca4a103a574119231ee9d3ea92b8d5.zip |
Warn on npm install if Bower isn't installed.
Diffstat (limited to 'build')
-rw-r--r-- | build/bower-install.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/build/bower-install.js b/build/bower-install.js new file mode 100644 index 000000000..fefcfc065 --- /dev/null +++ b/build/bower-install.js @@ -0,0 +1,23 @@ +var installer, + which = require( "which" ), + spawn = require( "child_process" ).spawn; + +try { + which.sync( "bower" ); +} catch( error ) { + 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 ); +} + +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 ); +}); |