initial commit

This commit is contained in:
Brahim Hadriche committed 2022-10-30 16:17:37 -04:00
commit 0eadc5da55
37 files changed
+1286

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
const path = require('path');
const ProgramBuilder = require('brighterscript').ProgramBuilder;
const DiagnosticSeverity = require('brighterscript').DiagnosticSeverity;
let programBuilder = new ProgramBuilder();
programBuilder.run({
project: path.join(__dirname, '../', 'bsconfig.json')
}).then(() => {
//fail if there are diagnostics
if (programBuilder.program.getDiagnostics().filter((x) => x.severity === DiagnosticSeverity.Error).length > 0) {
throw new Error('Encountered error diagnostics');
} else {
console.log('\nBuild is finished');
}
}).catch(e => {
console.log('error', e.message);
process.exit(1);
});