Skip to content

Commit

Permalink
fix(yaml): Add extensions?: string[] to RollupYamlOptions types (#1506)
Browse files Browse the repository at this point in the history
* add extensions?: string[] to RollupYamlOptions

* test extension option in yaml/test/types.ts
  • Loading branch information
janosh committed Jun 19, 2023
1 parent d60f6eb commit 0cc9ef6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/yaml/test/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const config: RollupOptions = {
}

return data;
}
},
extensions: ['.yaml', '.yml', '.cff']
})
]
};
Expand Down
7 changes: 7 additions & 0 deletions packages/yaml/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ interface RollupYamlOptions {
* @default 'single'
*/
documentMode?: 'single' | 'multi';

/**
* File extensions to process. Useful if you have files that contain YAML but do not have a
* `.yaml` or `.yml` extension.
* @default ['.yaml', '.yml']
*/
extensions?: string[];
}

/**
Expand Down

0 comments on commit 0cc9ef6

Please sign in to comment.