@@ -18,6 +18,7 @@ var Logging = IonicAppLib.logging;
1818var log = Logging . logger ;
1919var Q = require ( 'q' ) ;
2020var helpUtil = require ( './utils/help' ) ;
21+ var EOL = require ( 'os' ) . EOL ;
2122
2223Cli . ALL_TASKS = Tasks ;
2324Cli . IONIC_DASH = 'https://apps.ionic.io' ;
@@ -268,7 +269,7 @@ Cli.loadGulpfile = function loadGulpfile() {
268269 var names = [ 'gulpfile.js' , 'Gulpfile.js' ] ;
269270 for ( var i = 0 , ii = names . length ; i < ii ; i += 1 ) {
270271 try {
271- require ( path . resolve ( process . cwd ( ) + '/' + names [ i ] ) ) ;
272+ require ( path . resolve ( process . cwd ( ) , names [ i ] ) ) ;
272273 log . verbose ( 'Gulpfile found' ) ;
273274 return true ;
274275 } catch ( e ) {
@@ -331,7 +332,7 @@ Cli.runNpmHook = function runNpmHook(hook) {
331332 } ) ;
332333 spawned . stdout . pipe ( process . stdout ) ;
333334 spawned . stdout . on ( 'data' , function ( data ) {
334- var dataLines = data . toString ( ) . split ( '\n' ) ;
335+ var dataLines = data . toString ( ) . split ( EOL ) ;
335336 for ( var i = 0 ; i < dataLines . length ; i ++ ) {
336337 if ( dataLines [ i ] . length ) {
337338 if ( dataLines [ i ] . indexOf ( 'watch ready' ) > - 1 ) {
@@ -360,7 +361,7 @@ Cli.loadNpmScripts = function loadNpmScripts() {
360361 var fileName = 'package.json' ;
361362
362363 try {
363- var packageFile = require ( path . resolve ( process . cwd ( ) + '/' + fileName ) ) ;
364+ var packageFile = require ( path . resolve ( process . cwd ( ) , fileName ) ) ;
364365 log . verbose ( 'Package.json found scripts:' , packageFile . scripts ) ;
365366 return packageFile . scripts ;
366367 } catch ( e ) {
0 commit comments