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

    https://github.com/apache/cordova-browser/pull/30#discussion_r119261009
  
    --- Diff: bin/template/cordova/Api.js ---
    @@ -96,6 +96,42 @@ Api.createPlatform = function (dest, config, options, 
events) {
             events.emit('error','createPlatform is not callable from the 
browser project API.');
             throw(e);
         }
    +    
    +    // Create manifest.json
    +    var manifestJson;
    +    var manifestJsonPath = path.join(dest,'manifest.json');
    +
    +    // Check if path exists and require manifestJsonPath.
    +    if(fs.existsSync(manifestJsonPath)) {
    +        try {
    +            manifestJson = require(manifestJsonPath);
    +        } 
    +        catch (e) {
    +            console.log("error : " + e);
    +            events.emit('error', 'unable to require manifest.json path.');
    +        }
    +    } else if (manifestJson === undefined) {
    +        manifestJson = {};
    +        if(config){
    +            if(config.name()) {
    +                manifestJson.name = config.name();
    +            }
    +            if(config.shortName()) {
    +                manifestJson.short_name = config.shortName();
    +            }
    +            if(config.packageName()) {
    +                manifestJson.version = config.packageName();
    +            }
    +            if(config.description()) {
    +                manifestJson.description = config.description();
    +            }
    +            if(config.author()) {
    +                manifestJson.author = config.author();
    +            }
    +        }
    --- End diff --
    
    For some reason, my review lost comments. I mentioned that we should add 
`manifest.start_url` which can be pulled from the `<content src="index.html" 
/>` tag in config.xml


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to