You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/08/27 15:03:22 UTC

[GitHub] [cordova-cli] infacto opened a new issue #529: Change Cordova project detection.

infacto opened a new issue #529:
URL: https://github.com/apache/cordova-cli/issues/529


   # Feature Request
   
   ## Motivation Behind Feature
   Currently a Cordova project is detected by the `config.xml` and the folder `www` (empty or not).
   The www folder is a deployment folder which should not included in git repo. You only use the www as source folder if you develop vanilla html and js without any framework. But the real life scenario is that you build an app with e.g. Angular, Vue, React, etc. and set the www as dist-folder.
   
   ## Feature Description
   Cordova should detect its project workspace by the config.xml or package.json only. Not the www-folder.
   
   ## Alternatives or Workarounds
   I have to ensure the existence of the temp folder www. But this is a pain.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] infacto commented on issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
infacto commented on issue #529:
URL: https://github.com/apache/cordova-cli/issues/529#issuecomment-682023319


   Yes you can use git ignore like:
   
   ```text
   www/*
   !www/.gitkeep
   ```
   
   Which will deploy `.gitkeep` to the app too. And may removed with a www clean command.
   Btw. the `index.html` can also be copied during the build process. No need to keep files in the www-folder.
   But anyway, I don't want to get off the topic. I just wonder if we could ignore the www-folder for a Cordova project detection. 
   Many commands depends on it to have the www-folder (empty or not). Also if you don't want to build. For example: Adding plugins. 
   
   I think we should consider to change this behavior. What's wrong to detect it by the config.xml and maybe package.json only. Regardless of the use of the www folder. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] brodybits commented on issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
brodybits commented on issue #529:
URL: https://github.com/apache/cordova-cli/issues/529#issuecomment-683720118


   And I think we should check for `www` before trying to build or run.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] raphinesse closed issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
raphinesse closed issue #529:
URL: https://github.com/apache/cordova-cli/issues/529


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] raphinesse commented on issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
raphinesse commented on issue #529:
URL: https://github.com/apache/cordova-cli/issues/529#issuecomment-697235144


   Since this issue affects multiple repositories, I am going to close this in favor of https://github.com/apache/cordova/issues/155


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] infacto edited a comment on issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
infacto edited a comment on issue #529:
URL: https://github.com/apache/cordova-cli/issues/529#issuecomment-682023319


   Yes you can use git ignore like:
   
   ```text
   www/*
   !www/.gitkeep
   ```
   
   Which will deploy `.gitkeep` to the app too. And may removed with a www clean command.
   Btw. the `index.html` can also be copied during the build process. No need to keep files in the www-folder.
   But anyway, I don't want to get off the topic. I just wonder if we could ignore the www-folder for a Cordova project detection. 
   Many commands depends on it to have the www-folder (empty or not). Also if you don't want to build. For example: Adding plugins. Only fail on builds / runs if the www-folder does not exist. But it should not be a part of the Cordova project detection.
   
   I think we should consider to change this behavior. What's wrong to detect it by the config.xml and maybe package.json only. Regardless of the use of the www folder. 
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] breautek commented on issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #529:
URL: https://github.com/apache/cordova-cli/issues/529#issuecomment-682012007


   > The www folder is a deployment folder which should not included in git repo. You only use the www as source folder if you develop vanilla html and js without any framework. But the real life scenario is that you build an app with e.g. Angular, Vue, React, etc. and set the www as dist-folder.
   
   I think this is an invalid assumption. Even if you build with frameworks like the ones you mentioned, you can always gitignore the files that are actually built/generated.
   
   e.g: I use react in my projects, with my source files inside a `./src/` directory, and use webpack to bundle my sources to `www/` but not all of my `www` files are generated, i.e: my `index.html` file.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-cli] raphinesse commented on issue #529: Change Cordova project detection.

Posted by GitBox <gi...@apache.org>.
raphinesse commented on issue #529:
URL: https://github.com/apache/cordova-cli/issues/529#issuecomment-683688494


   I think not having to rely on the presence of the `www` folder is a reasonable request. But before that change can be implemented sanely, we have to DRY our implementations of the methods to find the Cordova project root.
   
   Currently we have this implemented similarly (if not identically) in at least:
   
   - `cordova-lib/src/cordova/util.js`
   - `cordova-common/src/CordovaCheck.js`
   - `cordova-serve/src/util.js`
   
   where the version in `cordova-common` is not actually used anywhere AFAICT.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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