You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/11/06 03:21:49 UTC

[16/22] git commit: Fix pack.js for windows

Fix pack.js for windows

This allows ripple to build on windows by fixing a pathing issue. I only tested "hosted" and not the extension.

Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/416a7fa5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/416a7fa5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/416a7fa5

Branch: refs/heads/master
Commit: 416a7fa5571061ff3e430d74cdb5fa8ab3fb7dad
Parents: 007fbd5
Author: Jonathan <jr...@gmail.com>
Authored: Mon Oct 14 14:05:38 2013 -0400
Committer: Jonathan <jr...@gmail.com>
Committed: Mon Oct 14 14:05:38 2013 -0400

----------------------------------------------------------------------
 build/pack.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/416a7fa5/build/pack.js
----------------------------------------------------------------------
diff --git a/build/pack.js b/build/pack.js
index 0072681..50990b6 100644
--- a/build/pack.js
+++ b/build/pack.js
@@ -30,6 +30,7 @@ module.exports = function (opts) {
         panels = [],
         dialogs = [],
         thirdparty = [],
+        slash = !!process.platform.match(/^win/) ? "\\":"/",
         src = {
             info: JSON.parse(fs.readFileSync(_c.PACKAGE_JSON, "utf-8")),
             js: "",
@@ -89,7 +90,7 @@ module.exports = function (opts) {
     src.js += "window.ripple = ripple;\n";
 
     src.js += compile(lib, function (file, path) {
-        return "ripple.define('" + path.replace(_path.resolve(_c.LIB) + "/", "").replace(/\.js$/, '') +
+        return "ripple.define('" + path.replace(_path.resolve(_c.LIB) + slash, "").replace(/\.js$/, '').replace(/\\/g, "/") +
                "', function (ripple, exports, module) {\n" + file + "});\n";
     });