cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From audreyso <>
Subject [GitHub] cordova-test-platform pull request #1: Doc requirements for platform api exp...
Date Mon, 24 Jul 2017 16:54:54 GMT
Github user audreyso commented on a diff in the pull request:
    --- Diff: ---
    @@ -0,0 +1,144 @@
    +# New Platform Checklist
    +## Stand-alone scripts
    +bin/create scripts
    +- bin/create _(typically a node script)_
    +- bin/create.bat for windows
    +    - windows .bat file typically just calls bin/create with node
    +- not entirely sure this code is run, or needs to exist with newish non-destructive platform
    +## Package Expectations
    +- Platforms must have a package.json in their root.
    +- Package.json exports a 'main', usually `"main": "src/cordova/Api.js"`
    +    - This allows other modules to simply require() the path to this platform and get
access to the Api.
    +## Api (Platform) Expectations
    +- The PlatformApi class
    +    - The PlatformApi class is an abstraction around a particular platform that exposes
all the actions, properties, and methods for this platform so they are accessible programmatically.
    +    - It can install & uninstall plugins with all source files, web assets and js
    +    - It exposes a single 'prepare' method to provide a way for cordova-lib to apply
a project's setting/www content to the platform.
    +    - The PlatformApi class should be implemented by each platform that wants to use
the new API flow. For those platforms, which don't provide their own PlatformApi, there will
be a polyfill in cordova-lib.
    +    - Platforms that implement their own PlatformApi instance should implement all prototype
methods of this class to be fully compatible with cordova-lib.
    +    - The PlatformApi instance should define the following field:
    +        - platform : This is a String that defines a platform name.
    +- Api.js exports static functions
    --- End diff --
    Hmm so "static" functions came up in all of the notes, discussions, etc that I read through.
I assumed it meant -->
    Should I remove all the instances of "static" functions in this guide? Or maybe replace
it with something else? Or define static functions at the top somewhere so readers know? 

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message