File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6- var es = require ( 'event-stream' ) ;
6+ const es = require ( 'event-stream' ) ;
77
88/** Ugly hack for gulp-tsb */
99function handleDeletions ( ) {
10- return es . mapSync ( function ( f ) {
10+ return es . mapSync ( f => {
1111 if ( / \. t s $ / . test ( f . relative ) && ! f . contents ) {
1212 f . contents = new Buffer ( '' ) ;
1313 f . stat = { mtime : new Date ( ) } ;
@@ -17,9 +17,11 @@ function handleDeletions() {
1717 } ) ;
1818}
1919
20- var watch = process . platform === 'win32' ? require ( './watch-win32' ) : require ( 'gulp-watch' ) ;
20+ const watch = process . platform === 'win32'
21+ ? require ( './watch-win32' )
22+ : require ( 'gulp-watch' ) ;
2123
22- module . exports = function ( ) {
24+ module . exports = ( ) => {
2325 return watch . apply ( null , arguments )
2426 . pipe ( handleDeletions ( ) ) ;
2527} ;
Original file line number Diff line number Diff line change 11{
2- "name" : " watch" ,
3- "version" : " 1.0.0" ,
4- "description" : " " ,
5- "author" : " Microsoft " ,
6- "private" : true ,
7- "devDependencies" : {
8- "gulp-watch" : " ^4.3.5 "
9- }
2+ "name" : " watch" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " " ,
5+ "author" : " Microsoft " ,
6+ "private" : true ,
7+ "devDependencies" : {
8+ "gulp-watch" : " ^4.3.9 "
9+ }
1010}
Original file line number Diff line number Diff line change 33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6- var win = "Please run '.\\scripts\\npm.bat install' instead." ;
7- var nix = "Please run './scripts/npm.sh install' instead." ;
6+ const path = require ( 'path' ) ;
7+ const cp = require ( 'child_process' ) ;
88
99if ( process . env [ 'npm_config_disturl' ] !== 'https://atom.io/download/atom-shell' ) {
1010 console . error ( "You can't use plain npm to install Code's dependencies." ) ;
11- console . error ( / ^ w i n / . test ( process . platform ) ? win : nix ) ;
11+ console . error (
12+ / ^ w i n / . test ( process . platform )
13+ ? "Please run '.\\scripts\\npm.bat install' instead."
14+ : "Please run './scripts/npm.sh install' instead."
15+ ) ;
16+
1217 process . exit ( 1 ) ;
1318}
19+
20+ // make sure we install gulp watch for the system installed
21+ // node, since that is the driver of gulp
22+ if ( process . platform !== 'win32' ) {
23+ const env = Object . assign ( { } , process . env ) ;
24+
25+ delete env [ 'npm_config_disturl' ] ;
26+ delete env [ 'npm_config_target' ] ;
27+ delete env [ 'npm_config_runtime' ] ;
28+
29+ cp . spawnSync ( 'npm' , [ 'install' ] , {
30+ cwd : path . join ( path . dirname ( __dirname ) , 'lib' , 'watch' ) ,
31+ stdio : 'inherit' ,
32+ env
33+ } ) ;
34+ }
Original file line number Diff line number Diff line change 6969 "gulp-uglify" : " ^1.4.1" ,
7070 "gulp-util" : " ^3.0.6" ,
7171 "gulp-vinyl-zip" : " ^1.2.2" ,
72- "gulp-watch" : " 4.3.6" ,
7372 "innosetup-compiler" : " ^5.5.60" ,
7473 "is" : " ^3.1.0" ,
7574 "istanbul" : " ^0.3.17" ,
You can’t perform that action at this time.
0 commit comments