cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kamrik <>
Subject [GitHub] cordova-windows pull request: Draft implementation for Unified pla...
Date Tue, 26 May 2015 16:38:36 GMT
Github user kamrik commented on a diff in the pull request:
    --- Diff: template/cordova/Api.js ---
    @@ -0,0 +1,54 @@
    +/*jshint node: true*/
    +var path = require('path');
    +var buildImpl = require('./lib/build');
    +var requirementsImpl = require('./lib/check_reqs');
    +function PlatformApi () {
    +    // Set up basic properties. They probably will be overridden if this API is used
by cordova-lib
    +    this.root = path.join(__dirname, '..', '..');
    +    this.platform = 'windows';
    +    if (this.constructor.super_){
    +        // This should only happen if this class is being instantiated from cordova-lib
    +        // In this case the arguments is being passed from cordova-lib as well,
    +        // so we don't need to care about whether they're correct ot not
    +        this.constructor.super_.apply(this, arguments);
    +    }
    + = function(context) {
    +    var buildOptions = context && context.options || [];
    +    return;
    +PlatformApi.prototype.requirements = function () {
    +    return requirementsImpl.check_all();
    +function PlatformHandler() {
    --- End diff --
    Do we want to keep PlatformHandler and PlatformApi as 2 separate classes long term?
    From the current CLI style workflow, the methods in PlatformHandler seem to be like something
private that should be hidden from the user. But actually some of the methods like getWwwDir()
might be very useful to the user. An example would be when the web app is very large and copying
it all on updateWww become a heavy operation. But if the user knows where to copy the files
to, he can fine-tune his workflow to only copy changes which is a very common case when working
with gulp/grunt watch.

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