diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index ec24306e..34235548 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -10,6 +10,8 @@ jobs: run: npm install - name: Build run: npm run build + - name: Build Schemas + run: npm run buildschemas - name: Run tests run: npm run test deploy: diff --git a/build.js b/build.js index cf7ddb77..3d90b1a8 100644 --- a/build.js +++ b/build.js @@ -22,13 +22,11 @@ function compileDictionary() { '$schema': 'http://json-schema.org/draft-04/schema#', definitions: {} } - // Fill dictionary for (const file of glob.sync('schemas/dictionary/*.yml')) { const contents = fs.readFileSync(file) Object.assign(dictionary.definitions, yaml.safeLoad(contents)) } - // Save dictionary const contents = JSON.stringify(dictionary, null, 2) fs.writeFileSync('schemas/dictionary.json', contents) @@ -45,6 +43,7 @@ async function buildSchemas() { const contents = JSON.stringify(schema, null, 2) fs.writeFileSync(`${BUILD_DIR}/${basename}`, contents) } + console.log('Built Schemas') } @@ -55,6 +54,7 @@ function buildRegistry() { const registry = csvParseSync(fs.readFileSync('schemas/registry.csv'), {columns: true}) const contents = JSON.stringify(registry, null, 2) fs.writeFileSync(`${BUILD_DIR}/registry.json`, contents) + console.log('Built registry') }