Skip to content

(improvement) Do not require the www-folder to detect a Cordova-based project. #155

@Domvel

Description

@Domvel

Improvement (Bug? Feature Request?)

Currently Cordova requires the file config.xml and the www folder to detect a Cordova-based project.

The need of the www-folder is not necessary. It does not matter if it is empty or not. And Cordova will not touch it. (e.g. for installing a native plugin). Cordova is just happy if the www-folder is there.

It's annoying if the www-folder is the dist (build) folder and not tracked by git.
In this case I have to add a .gitkeep file and ignore all other files inside for git.
To always keep it.

If you try to install a plugin without the www-folder, you'll get the error:

cordova plugin add cordova-plugin-inappbrowser --verbose
Current working directory is not a Cordova-based project.

Expected behavior:
Only detect the Cordova-based project by the config.xml.

Q: Why? The www-folder is the source Folder for Cordova!

A: Well, it is used to build the apk. But If you use frameworks like Ionic / Angular you have another source base (src-folder) and build to the www-folder to finally pack it to the apk with Cordova.
And the www-folder is not a part of the git-repository.

What do you think? Can we do without the www-folder? It's just a dummy in this case.

Cordvoa Version 9.0.0

Workaround

.gitignore

www/*
!www/.gitkeep

Add a .gitkeep file to the www-folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions