🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

cordova-xml

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-xml

Edit cordova config.xml from the command line or via API

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
8
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

cordova-xml

Edit cordova config.xml from the command line or via API. Uses the awesome node-xmlpoke.

Install

npm install --save-dev cordova-xml

or global:

npm install -g cordova-xml

CLI Usage

cordova-xml <action> <args>

CLI examples

cordova-xml setId com.example.myid --config /path/to/config.xml
cordova-xml setVersion 1.2.3
cordova-xml setId com.example.myid
cordova-xml setAndroidVersion 1.4.5
cordova-xml setIosVersion 1.1.2
cordova-xml setName TestApp
cordova-xml setDescription 'my app description'
cordova-xml setAuthorEmail 'email@example.com'
cordova-xml setAuthorName 'Author Authsson'
cordova-xml setAuthorWebsite 'http://example.com'
cordova-xml setXml "/w:widget/w:platform[@name='android']" '<test>hey</test>'

lib examples

require('cordova-xml')().setId('com.example.myid')
require('cordova-xml')('/path/to/config.xml').setId('com.example.myid')

Use xmlpoke directly

const cordovaXml = require('cordova-xml')();
cordovaXml.withPoke(xml => xml.add("/w:widget/w:platform[@name='android']/something", xml.XmlString('<text>hey</text>')));

See node-xmlpoke for more info.

https://github.com/ragingwind/cordova-config-cli - Inspiration. However this one mutates the XML doc more

Keywords

config.xml

FAQs

Package last updated on 18 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts