_From @raphinesse on July 5, 2018 8:49_

### Current situation

`cordovaCreate` supports handling of at least three different layouts for the
templates that are referenced by `url`. Let `TEMPLATE` be the directory on disk 
that
contains the resolved template. Then there are these three cases:

1. `TEMPLATE` contains a proper template as documented in the [template docs]  
   `cordovaCreate` will copy all contents of `TEMPLATE/template_src` to `dir` 
(simplified)
2. A "bare" folder w/out a main module  
   `cordovaCreate` will copy all contents of `TEMPLATE` except for some 
blacklisted² files to `dir`
3. `basename(TEMPLATE) === 'www'`  
   `cordovaCreate` will copy `TEMPLATE` to `dir/www`

Additionally `cordovaCreate` still handles (and corrects) the case that
`config.xml` is located in `TEMPLATE/www` instead of `TEMPLATE`.

²: `package.json`, `RELEASENOTES.md`, `.git`, `NOTICE`, `LICENSE`, `COPYRIGHT`, 
`.npmignore`

#### Pain Points
- AFAICT, only case 1 is documented
- Increased code & documentation complexity

### Proposal

- Drop support for 3.
- Document or drop 2.
- Drop Support for templates with `www/config.xml`.

[template docs]: 
https://cordova.apache.org/docs/en/latest/guide/cli/template.html

---

Migrated from #89

_Copied from original issue: apache/cordova-discuss#103_

[ Full content available at: https://github.com/apache/cordova-create/issues/25 
]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to