Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 183F0D063 for ; Tue, 29 Jan 2013 19:07:53 +0000 (UTC) Received: (qmail 61676 invoked by uid 500); 29 Jan 2013 19:07:52 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 61581 invoked by uid 500); 29 Jan 2013 19:07:52 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 61340 invoked by uid 99); 29 Jan 2013 19:07:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 19:07:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 049C7826F87; Tue, 29 Jan 2013 19:07:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [28/37] js commit: [all] modulemapper refactor for exec. Message-Id: <20130129190752.049C7826F87@tyr.zones.apache.org> Date: Tue, 29 Jan 2013 19:07:52 +0000 (UTC) [all] modulemapper refactor for exec. This was the last entry in common.js. https://issues.apache.org/jira/browse/CB-2227 Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/37c8b213 Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/37c8b213 Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/37c8b213 Branch: refs/heads/symbolmapping Commit: 37c8b213db4e710420198f2db1b94ae3fdc732b8 Parents: b1f2ffa Author: Andrew Grieve Authored: Fri Jan 25 15:19:28 2013 -0500 Committer: Andrew Grieve Committed: Mon Jan 28 19:56:47 2013 -0500 ---------------------------------------------------------------------- lib/common/common.js | 40 ---------------------------------------- lib/common/symbols.js | 27 +++++++++++++++++++++++++++ lib/scripts/bootstrap.js | 6 ------ 3 files changed, 27 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-js/blob/37c8b213/lib/common/common.js ---------------------------------------------------------------------- diff --git a/lib/common/common.js b/lib/common/common.js deleted file mode 100644 index 7c167c1..0000000 --- a/lib/common/common.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -module.exports = { - defaults: { - cordova: { - path: 'cordova', - children: { - exec: { - path: 'cordova/exec' - } - } - }, - Cordova: { - children: { - exec: { - path: 'cordova/exec' - } - } - } - } -}; http://git-wip-us.apache.org/repos/asf/cordova-js/blob/37c8b213/lib/common/symbols.js ---------------------------------------------------------------------- diff --git a/lib/common/symbols.js b/lib/common/symbols.js new file mode 100644 index 0000000..573b7e9 --- /dev/null +++ b/lib/common/symbols.js @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var modulemapper = require('cordova/modulemapper'); + +// Use merges here in case others symbols files depend on this running first, +// but fail to declare the dependency with a require(). +modulemapper.merges('cordova', 'cordova'); +modulemapper.clobbers('cordova/exec', 'cordova.exec'); +modulemapper.clobbers('cordova/exec', 'Cordova.exec'); http://git-wip-us.apache.org/repos/asf/cordova-js/blob/37c8b213/lib/scripts/bootstrap.js ---------------------------------------------------------------------- diff --git a/lib/scripts/bootstrap.js b/lib/scripts/bootstrap.js index 62f3e69..45c70aa 100644 --- a/lib/scripts/bootstrap.js +++ b/lib/scripts/bootstrap.js @@ -36,14 +36,8 @@ */ channel.join(function() { var builder = require('cordova/builder'), - base = require('cordova/common'), platform = require('cordova/platform'); - // Drop the common globals into the window object, but be nice and don't overwrite anything. - builder.buildIntoButDoNotClobber(base.defaults, context); - builder.buildIntoAndClobber(base.clobbers, context); - builder.buildIntoAndMerge(base.merges, context); - builder.buildIntoButDoNotClobber(platform.defaults, context); builder.buildIntoAndClobber(platform.clobbers, context); builder.buildIntoAndMerge(platform.merges, context);