From cf6e10bb0c173ace2617dca2b52349893f6f3016 Mon Sep 17 00:00:00 2001 From: zhihuilai Date: Tue, 21 Feb 2017 16:02:35 +0800 Subject: [PATCH] Hi Jed :) , in windows, use `npm` will throw an error, consider using `npm.cmd`, it works fine. --- tasks/release.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/release.js b/tasks/release.js index 56b3fcb..49d00a2 100644 --- a/tasks/release.js +++ b/tasks/release.js @@ -19,7 +19,7 @@ module.exports = function (gulp, config) { gulp.task('publish:npm', function (done) { require('child_process') - .spawn('npm', ['publish'], { stdio: 'inherit' }) + .spawn(process.platform === 'win32' ? 'npm.cmd' : 'npm', ['publish'], { stdio: 'inherit' }) .on('close', done); });