@squiz/vermgmt
v1.0.2
Published
Management script for components, including version management and custom commands
Downloads
659
Maintainers
Keywords
Readme
verMgmt: DXP Component Service Version Management Script
Intro
verMgmt is a version management script for Component Service, designed to easily increment or decrement the versions of components included in the manifest.json
files. Additionally, it allows running custom commands on project components, such as deploying and listing files inside a component's folder.
All commands, including increment, decrement, and custom commands, can be executed for a single selected component or multiple selected components.
Installation
To install verMgmt, use the following command:
npm i @squiz/verMgmt
Usage
After installation, add the following script to your package.json
:
{
"scripts": {
"vermgmt": "vermgmt"
}
}
Then, verMgmt can be used by running:
npm run vermgmt
This will start the script and present a list of options to manage components' versions or run custom commands.
[Optional] For direct use run command:
node ./bin/verMgmt.js ./verMgmt.config.json
Configuration
By default, verMgmt is configured to look for manifest files in the following path:
{
"manifestGlob": "components/*/manifest.json"
}
This configuration can be overridden by creating a verMgmt.config.json
file in the project root directory. This allows customization of paths and addition of custom commands to suit the project's needs.
Example verMgmt.config.json
:
{
"manifestGlob": "components/*/src/manifest.json",
"customCommands": [
{
"name": "Build and deploy",
"value": "npm run build && npx @squiz/dxp-cli-next cmp deploy ."
},
{
"name": "List root files (command: ls -l)",
"value": "ls -l"
}
]
}
Additionally, it may be necessary to adjust the deployment path to match the location where the build files are stored.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss the proposed changes.
Please make sure to update tests as appropriate.