
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
config-cordova
Advanced tools
Parse and edit the config.xml file of a cordova project.
This project is based on the cordova-config repo (https://github.com/SamVerschueren/cordova-config) and the cordova-config-cli (https://github.com/ragingwind/cordova-config-cli/blob/master/package.json).
npm install --save config-cordova
const Config = require('cordova-config');
// Load and parse the config.xml
const config = new Config('config.xml');
config.setName('My application');
config.setDescription('This is the description of my application');
config.setAuthor('Sam Verschueren', 'sam.verschueren@gmail.com', 'https://github.com/SamVerschueren');
// Write the config file
config.writeSync();
Loads and parses the file.
Required
Type: string
The path to the config.xml file.
Sets the
<name>name</name>tag in the xml file.
Required
Type: string
The name of the application.
Sets a
<tag>text</tag>tag in the xml file.
Required
Type: string
The name of the element.
Type: string
The element text.
Type: object
The element attributes
Sets the
<description>description</description>tag in the xml file.
Required
Type: string
The description of the application.
Sets the
<author email="email" href="website">name</author>tag in the xml file.
Required
Type: string
The name of the author.
Type: string
The email address of the email.
Type: string
The website of the author.
Sets the version attribute of the
widgettag in the xml file.
Required
Type: string
The version in the format x.y.z.
Sets the android-versionCode attribute of the
widgettag in the xml file.
Required
Type: number
The Android version code.
Sets the Android package name of the config file.
Required
Type: string
The android package name.
Sets the ios-CFBundleVersion attribute of the
widgettag in the xml file.
Required
Type: string
The version in the format x.y.z.
Sets the iOS CFBundleIdentifier of the config file.
Required
Type: string
The iOS CFBundleIdentifier.
Adds a
<preference name="name" value="value" />tag to the xml file.
Required
Type: string
The name of the preference tag.
Required
Type: string|boolean
The value of the preference.
Removes all the
<access />tags in the xml file.
Removes the
<access />tag with the origin equal to the parameter.
Required
Type: string
The origin of the access tag you want to remove.
Adds an
<access />tag to the xml file.
Required
Type: string
The origin of the access tag.
Type: object
A map with extra attributes that will be added to the access tag.
Sets the ID of the config file.
Required
Type: string
The id of the widget tag.
Adds the hook with type and src. see Apache Cordova API Documentation for more info.
Required
Type: string
Cordova hook type. ex) 'after_build', 'after_compile', 'after_clean'
Required
Type: string
Src path of hook script
Adds a raw xml element to the root of the config file.
Required
Type: string
A raw xml element. You can only pass in one element with one root.
Writes the
config.xmlfile async.
Resolves a promise when the file is written.
Writes the
config.xmlfile synchronously.
$ config-cordova <actions> <config> <value> <options>
$ config-cordova set name "New Name"
$ config-cordova set name "New Name" --config=../config.xml
$ config-cordova add hook after_prepare script/after_prepare.js --config=../config.xml
$ config-cordova rm access-origin "*" --config=../fixtures/config.xml
See config-cordova APIs to find value signature of the method
MIT © Sam Verschueren
FAQs
Parse and edit the config.xml file of a cordova project
The npm package config-cordova receives a total of 0 weekly downloads. As such, config-cordova popularity was classified as not popular.
We found that config-cordova demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.