microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
scripts/collections/README.md
32lines · modecode
| 1 | --- |
| 2 | title: Collection Scripts |
| 3 | description: PowerShell tooling for validating collection manifests and shared collection helpers |
| 4 | --- |
| 5 | |
| 6 | PowerShell tooling for validating collection manifests and shared collection |
| 7 | helper functions used by both collection validation and plugin generation. |
| 8 | |
| 9 | ## Scripts |
| 10 | |
| 11 | | Script | npm Command | Description | |
| 12 | |--------------------------------|-------------------------------------|---------------------------------------------------| |
| 13 | | Validate-Collections.ps1 | `npm run lint:collections-metadata` | Validate collection manifests | |
| 14 | | Modules/CollectionHelpers.psm1 | (library) | YAML parsing, frontmatter, and collection helpers | |
| 15 | |
| 16 | ## Prerequisites |
| 17 | |
| 18 | * PowerShell 7.0+ |
| 19 | * PowerShell-Yaml module (`Install-Module PowerShell-Yaml`) |
| 20 | |
| 21 | ## Adding a New Collection |
| 22 | |
| 23 | 1. Create `collections/<id>.collection.yml` (see existing collections for |
| 24 | format) |
| 25 | 2. Run `npm run lint:collections-metadata` to check the manifest |
| 26 | 3. Run `npm run plugin:generate` to generate the plugin |
| 27 | 4. Commit both the collection and generated plugin |
| 28 | |
| 29 | <!-- markdownlint-disable MD036 --> |
| 30 | *🤖 Crafted with precision by ✨Copilot following brilliant human instruction, |
| 31 | then carefully refined by our team of discerning human reviewers.* |
| 32 | <!-- markdownlint-enable MD036 --> |