Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 027889D39 for ; Wed, 18 Apr 2012 00:02:05 +0000 (UTC) Received: (qmail 74069 invoked by uid 500); 18 Apr 2012 00:02:04 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 74048 invoked by uid 500); 18 Apr 2012 00:02:04 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 74040 invoked by uid 99); 18 Apr 2012 00:02:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 00:02:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pmuellr@gmail.com designates 209.85.210.175 as permitted sender) Received: from [209.85.210.175] (HELO mail-iy0-f175.google.com) (209.85.210.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 00:01:57 +0000 Received: by iaag37 with SMTP id g37so9843546iaa.6 for ; Tue, 17 Apr 2012 17:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=OMpKYuYJ8MsI4A0X3sMToCEartbfaM9E4l7GVC+AVB0=; b=wPqaxw5IwA4hy5M00KcznlyVr/YK1RMJJ/ejpA5DdAKVn6F5ZXKK7AFJyOxmfGtQZq zR9nfI1qhLMuTMWzLA+sjcUar3/XHrXhuERJooTOnGdSqrslbwKddoJraBPYF0xyALh2 o53PG1jocezWvSwnTGDY7KVXiK/CY3efIOEvmwKvVZtm/+UvKzCVXwDkQewiZUFs6rAW RmH/0IuRCQI84xgZBL30wne5t8fIkb+Lrh+Ifn/IKJJvmeJlh6eMBStVIxg4ClPyPefB 2i5MVx/23xYwr4xSOzXaPZHSWAa5XzIjotrqc9nrQda1AIAOmkV2f5wO2uOZ/hBjHQqM RdGg== MIME-Version: 1.0 Received: by 10.50.194.228 with SMTP id hz4mr40647igc.35.1334707296749; Tue, 17 Apr 2012 17:01:36 -0700 (PDT) Received: by 10.231.222.10 with HTTP; Tue, 17 Apr 2012 17:01:36 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Apr 2012 20:01:36 -0400 Message-ID: Subject: Re: [Cordova-JS] Platform-specific plugin directory structure From: Patrick Mueller To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=14dae93406914d47c004bde8c20d --14dae93406914d47c004bde8c20d Content-Type: text/plain; charset=ISO-8859-1 On Tue, Apr 17, 2012 at 19:04, Filip Maj wrote: > How come we use the following dir structure for platforms: > > lib > - android > - plugin > - android > ... > Here's how the files / directories are laid out: - lib/[platform]/* platform-specific modules for specified platform - lib/common/* portable modules - lib/script/* JavaScript files which are NOT modules - lib/cordova.js - bootstrap JavaScript file In the case of the modules, in lib/[platform] and lib/common, the names of the file correspond to the module id. Here are the files in android and their respective module ids: android/exec.js cordova/exec android/platform.js cordova/platform android/plugin/android/app.js cordova/plugin/android/app android/plugin/android/callback.js cordova/plugin/android/callback module ids are what is used as the argument of require() Note that the module ids are not encoded in the files, the module ids are calculated by the file's location in the file system. The reason the file "android/plugin/android/app.js" exists, is because there is a module with the id "cordova/plugin/android/app" that's specific to android. That's the way it works today anyway. -- Patrick Mueller http://muellerware.org --14dae93406914d47c004bde8c20d--