1.0.0 • Published 4 years ago
standard-version-updater-xml v1.0.0
standard-version-updater-xml
An XML updater for standard-version. All the parsing and writing is done by xmlbuilder2. Huge props to them 🎉, support these projects in any way you can!
Install
npm install --save-dev standard-version-updater-xmlUsage
You can use it as any other standard-version custom updater. In your config file:
JS Config
// .versionrc.js
const xmlUpdater = require('standard-version-updater-xml');
const xmlTracker = {
  filename: 'PATH_TO_MY_XML_FILE',
  updater: xmlUpdater,
};
module.exports = {
  packageFiles: [xmlTracker],
  bumpFiles: [xmlTracker],
};JSON Config
{
  "packageFiles": [
    {
      "filename": "PATH_TO_MY_XML_FILE",
      "updater": "node_modules/standard-version-updater-xml/index.js"
    }
  ],
  "bumpFiles": [
    {
      "filename": "PATH_TO_MY_XML_FILE",
      "updater": "node_modules/standard-version-updater-xml/index.js"
    }
  ]
}Then, use standard-version in your preferred flavour. Mine:
npx standard-versionNotes
- You can use any file parseable by xmlbuilder2, even 
.csprojfiles! - Empty lines will be removed when writing version.
 - An xml declaration will be added on top the file if it's not already present.
 
1.0.0
4 years ago