cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Commented] (CB-1892) Refactor type-checking code in plugins into a helper method
Date Thu, 22 Nov 2012 20:54:57 GMT


Andrew Grieve commented on CB-1892:

argscheck module:;a=commit;h=1dfa2ac54a41287279e6726d2b748060e1cc44bf

Lower-case .js plugin files:;a=commit;h=9ba65d4f42cddf0cdc1c1f1b624df201bde0ca18;a=commit;h=f400233bef00da6d3678d95e4abf745a1f62e07f;a=commit;h=58990dad50f337fd8c71250398d6586ae2b055ac;a=commit;h=f81be6623d3429f442a0e214adfe3f66fff32b1f;a=commit;h=4864283bcc17d37d7d28d85ffed9dc41dd3931f9;a=commit;h=1fe276bcb9b36ced8be236c40886a6c0dc0a1076;a=commit;h=ee4a70cce10fadd7a7563eb2941f231c9841d009

So far, 4kb off of cordova.ios.js (from 192 to 188kb)
245 insertions(+), 323 deletions(-)

This is now mostly done, but need to check if it would make sense for any of the CamelCase.js
files to use it.
> Refactor type-checking code in plugins into a helper method
> -----------------------------------------------------------
>                 Key: CB-1892
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>            Priority: Minor
>             Fix For: 2.3.0
> ML Discussion:
> The idea is to add a typecheck module along the lines of:
> argscheck.checkArgs('noasdf', 'testFunc', arguments);
> where n=number, o=object, a=array, s=string, d=date, f=function, *=anything
> Side-effects of this change will include:
> 1. All core plugins will have their callbacks be optional
> 2. Incorrect types will result in an exception thrown
> 3. Should reduce the size of cordova.js through removing repetitive code.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message