File size: 561 Bytes
a8f4b72 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { validateSchematron } from './validator/schematron-validator.js';
const sourceDirectory = dirname(fileURLToPath(import.meta.url));
const packageDirectory = resolve(sourceDirectory, '..');
const errors = validateSchematron(
resolve(packageDirectory, 'fixtures/bootstrap-valid.xml'),
resolve(packageDirectory, '../../schemas/ProjectOS.sch')
);
if (errors.length) {
console.error(errors);
process.exitCode = 1;
} else {
console.log('schematron passed');
}
|