sync-cordova-xml
Sync Cordova's XML files with your package.json
Last updated 3 years ago by emilbayes .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install sync-cordova-xml 
SYNC missed versions from official npm registry.

sync-cordova-xml

Sync Cordova's XML files with your package.json

Usage

var sync = require('sync-cordova-xml')

sync(require('./package.json'), xmlString, 'plugin')

This module will synchronise:

  • .version => /@version
  • .name => /name
  • .description => /description

For application it will attemt to set:

  • .displayName => /name, display name being a cordova convention

For plugins it will additionally attempt to set:

  • .name => /@id. Note that as a quirk, cordova will trim the npm scope off this when installing. This plugin will remove scope from the /@id to avoid the issue

  • .license => /license

  • .keywords[] => /keywords joined to comma delimited string

  • .repository.url => /repo (OR simply use .repository if string)

  • .bugs.url => /issue

  • .author as string will be parsed into the next properties

  • .author.name => /author

  • .author.url => /author/@href

  • .author.email => /author/@email

CLI

sync-cordova-xml [--plugin|--config] [--output=plugin.xml] package.json plugin.xml

NOTE: For convenience the CLI will guess the mode from the 2nd argument filename. To absolutely force either mode, regardless of filename, use the one of the flags.

You can add this script to your package.json for automatic sync on each npm version:

"version": "sync-cordova-xml package.json config.xml --output=config.xml && git add config.xml"

API

var resultXml = sync(json, sourceXml, [mode])

Install

npm install sync-cordova-xml

License

ISC

Current Tags

  • 0.4.0                                ...           latest (3 years ago)

6 Versions

  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.2                                ...           3 years ago
  • 0.2.1                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 2
This Week 2
This Month 8
Last Day 0
Last Week 2
Last Month 6
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |