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 45E2B9B74 for ; Tue, 28 Feb 2012 17:01:33 +0000 (UTC) Received: (qmail 5590 invoked by uid 500); 28 Feb 2012 17:01:33 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 5490 invoked by uid 500); 28 Feb 2012 17:01:33 -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 5481 invoked by uid 99); 28 Feb 2012 17:01:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 17:01:33 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fil@adobe.com designates 64.18.1.27 as permitted sender) Received: from [64.18.1.27] (HELO exprod6og111.obsmtp.com) (64.18.1.27) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 17:01:24 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob111.postini.com ([64.18.5.12]) with SMTP ID DSNKT00ITmvdjtXO+lduy2GtrASxMA0BSUnm@postini.com; Tue, 28 Feb 2012 09:01:03 PST Received: from inner-relay-1.corp.adobe.com (inner-relay-1.adobe.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q1SH11N3014814 for ; Tue, 28 Feb 2012 09:01:01 -0800 (PST) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q1SH06MZ028552 for ; Tue, 28 Feb 2012 09:00:59 -0800 (PST) Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nacas02.corp.adobe.com ([10.8.189.100]) with mapi; Tue, 28 Feb 2012 09:00:38 -0800 From: Filip Maj To: "callback-dev@incubator.apache.org" Date: Tue, 28 Feb 2012 09:00:26 -0800 Subject: Re: proposed common-js file moves/renames for post-1.5 Thread-Topic: proposed common-js file moves/renames for post-1.5 Thread-Index: Acz2On5+UFhETWQFTseMRSf0arxhhg== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.14.0.111121 acceptlanguage: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Yeah I like it overall. I'll file it in JIRA and set it up for post-1.5. I am not sure I like the index.js thing=8A but I don't know why ;) On 2/24/12 8:11 AM, "Patrick Mueller" wrote: >On Fri, Feb 24, 2012 at 10:39, Drew Walters wrote: > >> > - move the platform-specific modules out of `lib`, into a new >>top-level >> > directory named `platform`, which has subdirectories for each >>platform, >> and >> > then cordova/blah/... directories for any additional files for the >> > platform, including potentially overlaid files >> I don't understand why this would be a peer of `lib` and not a child. >> In your examples you list 'platform/android/cordova/exec.js'. This >> seems to imply that the platform specific files could apply to more >> then just cordova since cordova would be a child. >> > >Right; there would be multiple `cordova` subdirectories in the tree: > > cordova-js/cordova/... - all the portable stuff > cordova-js/platform/android/cordova - all the android specfic stuff > cordova-js/platform/ios/cordova - all the ios specfic stuff > >So, yes, I would expect that platforms could supply modules "outside" of >the cordova module-id-space. So, there might exist a file > > cordova-js/platform/android/my-coolio-stuff.js > >This would end up getting built as a top-level 'my-coolio-stuff' module - >require('my-coolio-stuff') would return that module, for android. > >But I don't expect that we would actually do that. The reason to have the >cordova directory IN the `cordova/platform/android` directory, is so that >the directories of the modules line up with the module ids that we >generate. Otherwise, you'll need to do the translation everytime you see > > cordova-js/platform/android/app.js > >and realize - "oh that's actually the module 'cordova/app' > > >> Unless there is a >> reason for this, I still like 'cordova/platform/android/exec' better. >> Seems to me we would want to keep the module namespace beneath >> 'cordova'. >> > >To be more specific: > >- rename `~/lib` to `~/cordova`; there is no more `~/lib`. >- mkdir ~/platform >- mkdir ~/platform/android >- mkdir ~/platform/... >- move platform-specific stuff in ~/cordova (was ~/lib), in such a way as >each module exists in a path associated with it's eventual module id, >prefixed by `~/platform/[whicheverPlatform]` >- move non-modules into a 'new' `~/lib` directory; it's more than just >require.js - bootstrap, etc > >Now, to do a build for a platform: >- collect as modules all files from ~/cordova >- collect as modules all files from ~/platform/[whicheverPlatform]/cordova >- collect as scripts all files from ~/lib > >bonusi: > >- the files are laid out exactly as the modules will be named, modulo >platform-specific prefix directories for platform-specific files; no more >in-head conversion when I'm looking at directory listings of modules. > >- no more logic in the build script, just three "virtual" `cp -R`s. > >- prolly easy to use with requirejs et al > > > - there are also plain ol' scripts like `require.js` which should be > >> > separate from the modules, in say a top-level `scripts` directory >> +1 though I think require.js is the only example of this so far and I >> would vote for keeping it under 'cordova' name space and in a 'lib' >> folder (showing my C roots). >> > >Pretty sure it's more than require.js. And `scripts` makes more sense to >me than `lib`. > >--=20 >Patrick Mueller >http://muellerware.org