mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-07 09:23:00 +02:00
#621 - Create data file if it does not exist yet
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
- [#603](https://github.com/estruyf/vscode-front-matter/issues/603): Fix problem with page bundles and path placeholders
|
||||
- [#617](https://github.com/estruyf/vscode-front-matter/issues/617): Fix insert media snippet dialog by using a slideover instead of a dialog
|
||||
- [#620](https://github.com/estruyf/vscode-front-matter/issues/620): Fix in array field of data files
|
||||
- [#621](https://github.com/estruyf/vscode-front-matter/issues/621): Create data file if it does not exist yet
|
||||
|
||||
## [8.4.0] - 2023-04-03 - [Release notes](https://beta.frontmatter.codes/updates/v8.4.0)
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ export class DataListener extends BaseListener {
|
||||
if (!(await existsAsync(dirPath))) {
|
||||
await mkdirAsync(dirPath, { recursive: true });
|
||||
}
|
||||
|
||||
await writeFileAsync(absPath, '', 'utf8');
|
||||
}
|
||||
|
||||
const fileContent = await readFileAsync(absPath, 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user