mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-07-07 02:11:25 +02:00
added schema support on build
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const pkgJson = require('../../package.json');
|
||||
|
||||
if (pkgJson?.contributes?.configuration) {
|
||||
const schema = {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://frontmatter.codes/frontmatter.schema.json",
|
||||
...pkgJson.contributes.configuration
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(path.resolve('.'), '/public/frontmatter.schema.json'), JSON.stringify(schema, null, 2));
|
||||
}
|
||||
Reference in New Issue
Block a user