Update document generation script

This commit is contained in:
Mike Farah
2021-11-03 15:00:28 +11:00
parent 5bedd759a8
commit a41131816a
34 changed files with 111 additions and 1337 deletions
+2 -10
View File
@@ -3,37 +3,29 @@
This operator splits all matches into separate documents
## Split empty
Running
```bash
yq eval --null-input 'splitDoc'
```
will output
```yaml
```
## Split array
Given a sample.yml file of:
```yaml
- a: cat
- b: dog
```
then
```bash
yq eval '.[] | splitDoc' sample.yml
```
will output
```yaml
a: cat
---
b: dog
```