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

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

brodybits opened a new pull request #8: CB-12397 fix .gitignore for plugins & 
platforms (cordova-create part)
URL: https://github.com/apache/cordova-create/pull/8
 
 
   <!--
   Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist
   is intended as a quick reference, for complete details please see our 
Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   
   All
   
   ### What does this PR do?
   
   Workaround for [Apache Cordova 
CB-12397](https://issues.apache.org/jira/browse/CB-12397): include .gitignore 
from `template_src` subdirectory of `cordova-app-hello-world`, needed due to 
the npm .gitignore/.npmignore behavior discussed in:
   - npm/npm#1862
   - npm/npm#3763
   - npm/npm#7252
   
   NOTE: Another part of the fix for  [Apache Cordova 
CB-12397](https://issues.apache.org/jira/browse/CB-12397) is in 
<https://github.com/brodybits/cordova-app-hello-world/tree/cb-12397>, to be 
raised after this PR.
   
   Additional commits:
   - cleanup: remove trailing whitespace
   - general updates to test suite
   
   ### What testing has been done on this change?
   
   #### Unit test
   
   Test suite updated to verify that `.gitignore` is included in the generated 
app when the standard `cordova-app-hello-world` template is used.
   
   #### Cordova CLI test
   
   - Using `cordova-cli` test version in 
<https://github.com/brodybits/cordova-cli/tree/cb-12397-devtest1> which uses 
local test installation of `cordova-lib` from 
<https://github.com/brodybits/cordova-lib/tree/cb-12397-devtest1> due to 
limitations discussed in npm/npm#2974.
   - `cordova-lib` in 
<https://github.com/brodybits/cordova-lib/tree/cb-12397-devtest1> references 
`cordova-create` in 
<https://github.com/brodybits/cordova-create/tree/cb-12397-devtest1> which 
includes this fix.
   - `cordova-create` in 
<https://github.com/brodybits/cordova-create/tree/cb-12397-devtest1> references 
`cordova-app-hello-world` in 
<https://github.com/brodybits/cordova-app-hello-world/tree/cb-12397-devtest1> 
which includes the `cordova-app-hello-world` fix in 
<https://github.com/brodybits/cordova-app-hello-world/tree/cb-12397>.
   
   **Testing with results and other output on Windows:**
   
   ```
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ npm install -g https://github.com/brodybits/cordova-cli#cb-12397-devtest1
   npm WARN deprecated [email protected]: Use uuid module instead
   C:\Users\Chris\nvs\node\7.10.0\x64\cordova -> 
C:\Users\Chris\nvs\node\7.10.0\x64\node_modules\cordova\bin\cordova
   C:\Users\Chris\nvs\node\7.10.0\x64
   `-- [email protected]  
(git+https://github.com/brodybits/cordova-cli.git#9f4648d5565b098434187aa3da251beca8d68dae)
   [...]
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ cordova --version
   7.0.2-cb-12397-devtest1
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ cordova create cb-12397-testapp1
   Creating a new cordova project.
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ ls -a !$
   History expansion: ls -a cb-12397-testapp1
   ./  ../  .gitignore  .npmignore  config.xml  hooks/  package.json  
platforms/  plugins/  res/  www/
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ cat cb-12397-testapp1\.gitignore
   # macOS
   .DS_Store
   
   # Generated by Cordova
   plugins
   platforms
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ
   ```
   
   `.gitignore` is now present in the generated app, with `plugins` and 
`platforms` as needed
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform 
affected.
   - [x] Added automated test coverage as appropriate for this change.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> fix .gitignore for plugins & platforms in app template
> ------------------------------------------------------
>
>                 Key: CB-12397
>                 URL: https://issues.apache.org/jira/browse/CB-12397
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>            Reporter: Chris Brody
>            Priority: Major
>              Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to