Skip to content

Commit 9a0fe82

Browse files
committed
fix(windows): test, tests, serve and server commands updated to work correctly on all windows versions
fix(grunt): Fixed grunt lib utility to work on all windows versions release(1.1.2): Version bump to 1.1.2 to release windows fixes
1 parent d0519a1 commit 9a0fe82

4 files changed

Lines changed: 20 additions & 8 deletions

File tree

bin/clever-server

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var path = require( 'path' )
55
, program = GLOBAL.program = require( 'commander' )
66
, fs = require( 'fs' )
77
, os = require( 'os' )
8+
, isWin = /^win32/.test( os.platform() )
89
, spawn = require( 'child_process' ).spawn;
910

1011
/** Define CLI Usage
@@ -95,5 +96,5 @@ folders.forEach( function ( folder, i ) {
9596
env.NODE_PATH = process.env.NODE_PATH ? process.env.NODE_PATH + ( os.platform( ) === "win32" ? ';' : ':' ) + _path_ : _path_;
9697
}
9798

98-
procs[i] = spawn( 'grunt', args, { cwd: folder.path, env: env, stdio: 'inherit' } );
99-
} );
99+
procs[i] = spawn( !isWin ? 'grunt' : 'grunt.cmd', args, { cwd: folder.path, env: env, stdio: 'inherit' } );
100+
});

bin/clever-test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var path = require( 'path' )
55
, program = GLOBAL.program = require( 'commander' )
66
, fs = require( 'fs' )
77
, os = require( 'os' )
8+
, isWin = /^win32/.test( os.platform() )
89
, spawn = require( 'child_process' ).spawn
910
, async = require( 'async' )
1011
, folders = [ ]
@@ -69,7 +70,7 @@ function start( reporter ) {
6970
env.NODE_PATH = paths.join( os.platform( ) === "win32" ? ';' : ':' );
7071
}
7172

72-
var proc = spawn( 'grunt', args, { cwd: folder.path, env: env, stdio: 'inherit' } )
73+
var proc = spawn( !isWin ? 'grunt' : 'grunt.cmd', args, { cwd: folder.path, env: env, stdio: 'inherit' } )
7374
, error = '';
7475

7576
proc.on( 'error', function ( err ) {

lib/util/grunt.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ var Promise = require( 'bluebird' )
33
, async = require( 'async' )
44
, fs = require( 'fs' )
55
, spawn = require( 'child_process' ).spawn
6-
, exec = require( 'child_process' ).exec;
6+
, exec = require( 'child_process' ).exec
7+
, os = require( 'os' )
8+
, isWin = /^win32/.test( os.platform() );
79

810
/**
911
* Mimmicks a small grunt-cli utility
@@ -117,7 +119,7 @@ var findGruntFile = exports.findGruntFile = function ( pathSrc ) {
117119

118120
function runTask ( projectFolder, cmd ) {
119121
var def = Promise.defer( )
120-
, proc = spawn( 'grunt', [ cmd ], { cwd: projectFolder, stdio: 'inherit' } );
122+
, proc = spawn( !isWin ? 'grunt' : 'grunt.cmd', [ cmd ], { cwd: projectFolder, stdio: 'inherit' } );
121123

122124
proc.on( 'close', function ( code ) {
123125
if (code !== 0) {

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
22
"name": "cleverstack-cli",
3-
"version": "0.1.1",
4-
"description": "Command line interface for CleverTech's CleverStack",
3+
"version": "0.1.2",
4+
"author": {
5+
"name": "CleverStack",
6+
"email": "admin@cleverstack.io",
7+
"web": "http://cleverstack.io"
8+
},
9+
"collaborators": [
10+
"Daniel Durante <daniel.durante@clevertech.biz>",
11+
"Richard Gustin <richard.gustin86@gmail.com>"
12+
],
13+
"description": "Command line interface for CleverStack",
514
"main": "./index.js",
615
"scripts": {
716
"test": "make tests"
@@ -13,7 +22,6 @@
1322
"keywords": [
1423
"framework"
1524
],
16-
"author": "",
1725
"license": "BSD-2-Clause",
1826
"bugs": {
1927
"url": "https://github.com/clevertech/cleverstack/issues"

0 commit comments

Comments
 (0)