docs(README): enhance badge update documentation and improve npm badge
- Updated the npm version badge in `README.md` to explicitly display the current version dynamically. - Added a new "Badge Maintenance" section to detail the automated badge update process during build or version changes. - Enhanced `generate-version.js` script to improve badge update logic, ensuring the npm version badge reflects `package.json` accurately. - Strengthened maintainability and accuracy of documentation for future updates.
This commit is contained in:
parent
1210638242
commit
64d77dfb5c
2 changed files with 14 additions and 3 deletions
13
README.md
13
README.md
|
|
@ -6,7 +6,7 @@
|
|||
[](https://nodejs.org/)
|
||||
[](https://www.typescriptlang.org/)
|
||||
[](CONTRIBUTING.md)
|
||||
[](https://www.npmjs.com/package/@soulcraft/brainy)
|
||||
[](https://www.npmjs.com/package/@soulcraft/brainy)
|
||||
|
||||
[//]: # ([](https://github.com/sodal-project/cartographer))
|
||||
|
||||
|
|
@ -1269,6 +1269,17 @@ Brainy follows a specific code style to maintain consistency throughout the code
|
|||
3. Make your changes
|
||||
4. Submit a pull request
|
||||
|
||||
### Badge Maintenance
|
||||
|
||||
The README badges are automatically updated during the build process:
|
||||
|
||||
1. **npm Version Badge**: The npm version badge is automatically updated to match the version in package.json when:
|
||||
- Running `npm run build` (via the prebuild script)
|
||||
- Running `npm version` commands (patch, minor, major)
|
||||
- Manually running `node scripts/generate-version.js`
|
||||
|
||||
This ensures that the badge always reflects the current version in package.json, even before publishing to npm.
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue