You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/12/13 02:02:42 UTC
js commit: browserify: added symbol list to generated cordova.js so
run time requires still work
Repository: cordova-js
Updated Branches:
refs/heads/master 6fde14b81 -> 496c42d54
browserify: added symbol list to generated cordova.js so run time requires still work
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/496c42d5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/496c42d5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/496c42d5
Branch: refs/heads/master
Commit: 496c42d5447b846a98b9eb43176479399fd5bf1e
Parents: 6fde14b
Author: Steve Gill <st...@gmail.com>
Authored: Fri Dec 12 17:02:14 2014 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Fri Dec 12 17:02:34 2014 -0800
----------------------------------------------------------------------
src/cordova_b.js | 14 +++++++-------
tasks/lib/write-license-header.js | 3 ++-
2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/496c42d5/src/cordova_b.js
----------------------------------------------------------------------
diff --git a/src/cordova_b.js b/src/cordova_b.js
index 159e38f..02f43aa 100644
--- a/src/cordova_b.js
+++ b/src/cordova_b.js
@@ -94,14 +94,14 @@ var cordova = {
platformVersion:PLATFORM_VERSION_BUILD_LABEL,
version:PLATFORM_VERSION_BUILD_LABEL,
require: function(module) {
- if(module === "cordova/exec") {
- return cordova.exec;
- }
- if(module === "org.apache.cordova.media.Media") {
- return window.Media;
- }
+ // if(module === "cordova/exec") {
+ // return cordova.exec;
+ // }
+ // if(module === "org.apache.cordova.media.Media") {
+ // return window.Media;
+ // }
- return require(module);
+ return require(symbolList[module].path);
},
platformId:platform.id,
/**
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/496c42d5/tasks/lib/write-license-header.js
----------------------------------------------------------------------
diff --git a/tasks/lib/write-license-header.js b/tasks/lib/write-license-header.js
index 5f2ed5d..9c5ffe2 100644
--- a/tasks/lib/write-license-header.js
+++ b/tasks/lib/write-license-header.js
@@ -24,7 +24,7 @@ var util = require('util');
var fs = require('fs');
var licensePath = path.join(__dirname, '..', 'templates', 'LICENSE-for-js-file.txt');
-module.exports = function(outStream, platform, commitId, platformVersion) {
+module.exports = function(outStream, platform, commitId, platformVersion, symbolList) {
// some poppycock
var licenseText = util.format("/*\n *%s\n */\n", fs.readFileSync(licensePath, 'utf8').replace(/\n/g, "\n *"));
@@ -34,5 +34,6 @@ module.exports = function(outStream, platform, commitId, platformVersion) {
outStream.write(licenseText, 'utf8');
outStream.write("var PLATFORM_VERSION_BUILD_LABEL = '" + platformVersion + "';\n", 'utf8');
outStream.write("var define = {moduleMap: []};\n", 'utf8');
+ outStream.write(util.format("var symbolList = %s", JSON.stringify(symbolList)), 'utf8');
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org