0.1.2 • Published 5 years ago

cordova-find-config v0.1.2

Weekly downloads
25
License
MIT
Repository
github
Last release
5 years ago

cordova-find-config Build Status

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:

  1. Use app/config.xml if present
  2. Else, use app/www/config.xml if present

License

MIT © Raphael von der Grün