You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by kamrik <gi...@git.apache.org> on 2014/04/23 04:57:36 UTC

[GitHub] cordova-cli pull request: CB-5833: Copy/link to custom merges and ...

GitHub user kamrik opened a pull request:

    https://github.com/apache/cordova-cli/pull/169

    CB-5833: Copy/link to custom merges and config.xml when

    When using cordova create with --link-to or --copy-from /some/dir, if /some/dir
    cntains merges or config.xml in addition to www, they will also be copied or
    linked

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kamrik/cordova-cli link_merges

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-cli/pull/169.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #169
    
----
commit ac405e049b6461c09900197ab658b1931275c06a
Author: Mark Koudritsky <ka...@gmail.com>
Date:   2014-04-23T02:52:26Z

    CB-5833: Copy/link to custom merges and config.xml when
    
    When using cordova create with --link-to or --copy-from /some/dir, if /some/dir
    cntains merges or config.xml in addition to www, they will also be copied or
    linked

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-cli pull request: CB-5833: Copy/link to custom merges and ...

Posted by mmocny <gi...@git.apache.org>.
Github user mmocny commented on a diff in the pull request:

    https://github.com/apache/cordova-cli/pull/169#discussion_r11900004
  
    --- Diff: src/create.js ---
    @@ -124,9 +129,22 @@ module.exports = function create (dir, id, name, cfg) {
             }
             // Keep going into child "www" folder if exists in stock app package.
             while (fs.existsSync(path.join(www_lib, 'www'))) {
    +            www_parent_dir = www_lib;
                 www_lib = path.join(www_lib, 'www');
             }
     
    +        // Find if we also have custom merges and config.xml as siblings of custom www.
    +        if (www_parent_dir && config_json.lib && config_json.lib.www) {
    +            custom_config_xml = path.join(www_parent_dir, 'config.xml');
    +            if ( !fs.existsSync(custom_config_xml) ) {
    +                custom_config_xml = '';
    --- End diff --
    
    I prefer null to empty string for these failure cases.  Empty string tests false in if statements, but is a valid input for others.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-cli pull request: CB-5833: Copy/link to custom merges and ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-cli/pull/169


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-cli pull request: CB-5833: Copy/link to custom merges and ...

Posted by mmocny <gi...@git.apache.org>.
Github user mmocny commented on a diff in the pull request:

    https://github.com/apache/cordova-cli/pull/169#discussion_r11900183
  
    --- Diff: src/create.js ---
    @@ -146,11 +170,20 @@ module.exports = function create (dir, id, name, cfg) {
             } else {
                 shell.mkdir(www_dir);
                 shell.cp('-rf', path.join(www_lib, '*'), www_dir);
    +            if (custom_merges) {
    +                shell.cp('-rf', path.join(custom_merges, '*'), path.join(dir, 'merges'));
    --- End diff --
    
    Why do we pre-create www_dir and not merges?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-cli pull request: CB-5833: Copy/link to custom merges and ...

Posted by mmocny <gi...@git.apache.org>.
Github user mmocny commented on the pull request:

    https://github.com/apache/cordova-cli/pull/169#issuecomment-41454574
  
    Looks great, lets ship it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---