From 7ff229fa4e7774ee7fa86965fc943c19ace575c3 Mon Sep 17 00:00:00 2001 From: Nikolai Vavilov Date: Fri, 15 Apr 2016 23:23:33 +0200 Subject: Support Windows in gulpfile.js --- js/gulpfile.js | 6 +++++- js/package.json | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/gulpfile.js b/js/gulpfile.js index 7e44aa76..c5220153 100644 --- a/js/gulpfile.js +++ b/js/gulpfile.js @@ -1,7 +1,11 @@ var gulp = require('gulp'); -var exec = require('child_process').exec; +var execFile = require('child_process').execFile; var glob = require('glob'); +function exec(command, cb) { + execFile('sh', ['-c', command], cb); +} + var protoc = process.env.PROTOC || '../src/protoc'; gulp.task('genproto_closure', function (cb) { diff --git a/js/package.json b/js/package.json index 6418e507..c16417ca 100644 --- a/js/package.json +++ b/js/package.json @@ -13,7 +13,7 @@ "glob": "~6.0.4" }, "scripts": { - "test": "./node_modules/gulp/bin/gulp.js test" + "test": "node ./node_modules/gulp/bin/gulp.js test" }, "repository": { "type": "git", -- cgit v1.2.3