cordova-find-config
v0.1.2
Published
Find config.xml in a cordova project
Downloads
231
Maintainers
Readme
cordova-find-config
Find config.xml in a cordova project
Install
$ npm install --save cordova-find-config
Usage
const findConfig = require('cordova-find-config')
const projectRoot = 'path/to/cordova-app'
// Asynchronous, returns promise of config path
findConfig(projectRoot)
.then(configPath => /* Use it! */)
// Synchronous, returns config path
const configPath = findConfig.sync(projectRoot))
Why?
From the cordova docs on config.xml:
Note that before version 3.3.1-0.2.0, the file existed at app/www/config.xml, and that having it here is still supported.
This package implements the same logic as cordova to look for a config.xml
:
- Use
app/config.xml
if present - Else, use
app/www/config.xml
if present
License
MIT © Raphael von der Grün