From 41753c1a85b9b923ef2e6d1d7a2102dad9d3d96f Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Fri, 24 Jul 2015 21:44:21 +0100 Subject: [PATCH] move down prepublish script execution --- scripts/publish.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/publish.js b/scripts/publish.js index a954b61a69..f71fa5f609 100755 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -95,10 +95,6 @@ changedPackages.forEach(function (name) { // push to be git committed changedFiles.push(pkgLoc); - - // prepublish script - var prePub = loc + "/scripts/prepublish.js"; - if (fs.existsSync(prePub)) require(prePub); }); changedFiles.forEach(function (loc) { @@ -112,6 +108,12 @@ exec("git push --tags", true); exec("make build-dist"); +changedPackages.forEach(function (name) { + // prepublish script + var prePub = getPackageLocation(name) + "/scripts/prepublish.js"; + if (fs.existsSync(prePub)) require(prePub); +}); + changedPackages.forEach(function (name) { var loc = getPackageLocation(name); exec("cd " + loc + " && npm publish", true);