cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13058) Remove the requirement that the platform api file be called Api.js
Date Fri, 21 Jul 2017 23:14:00 GMT

    [ https://issues.apache.org/jira/browse/CB-13058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096980#comment-16096980
] 

ASF GitHub Bot commented on CB-13058:
-------------------------------------

Github user audreyso commented on a diff in the pull request:

    https://github.com/apache/cordova-test-platform/pull/1#discussion_r128878157
  
    --- Diff: PlatformRequirements.md ---
    @@ -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
    + 
    +bin/update
    +- not entirely sure this code is run, or needs to exist with newish non-destructive platform
updates
    + 
    +## 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
files.
    +    - 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
    +    - there is currently a requirement that the file be called Api.js (todo:change that)
    + 
    --- End diff --
    
    https://issues.apache.org/jira/browse/CB-13058


> Remove the requirement that the platform api file be called Api.js
> ------------------------------------------------------------------
>
>                 Key: CB-13058
>                 URL: https://issues.apache.org/jira/browse/CB-13058
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-lib
>    Affects Versions: 7.0.0
>            Reporter: Audrey So
>
> Currently, the platform api file must be named Api.js. Remove the requirement that the
file be called Api.js.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message