Commit 87b91ffb authored by mohoff's avatar mohoff Committed by Richard Crosby

chore: run dev scripts as part of healthchecks

parent 8b7cdfe3
......@@ -11,7 +11,7 @@
"author": "Brickblock Engineering <dev@brickblock.io>",
"license": "MIT",
"scripts": {
"health": "ts-node -T scripts/healthcheck.ts",
"health": "ts-node --transpile-only scripts/healthcheck.ts",
"lint": "yarn lint:ts && yarn lint:json && yarn lint:markdown",
"lint:ts": "eslint --ext [.ts] src scripts",
"lint:ts:fix": "eslint --fix --ext [.ts] src scripts",
......@@ -24,10 +24,10 @@
"clean": "rimraf build/",
"build": "tsc",
"dev:load:commonjs": "yarn build; echo 'Loaded Config:\n'; cross-env NODE_ENV=development time node scripts/dev/load-commonjs.js | jq .",
"dev:load:es6": "echo 'Loaded Config:\n'; cross-env NODE_ENV=development time ts-node -T scripts/dev/load-es6.ts | jq .",
"dev:load:es6": "echo 'Loaded Config:\n'; cross-env NODE_ENV=development time ts-node --transpile-only scripts/dev/load-es6.ts | jq .",
"dev:load": "yarn dev:load:es6",
"dev:load:watch": "nodemon --exec 'yarn dev:load:es6'",
"dev:validate": "echo 'Validation Result:\n'; cross-env NODE_ENV=development time ts-node -T scripts/dev/validate.ts",
"dev:validate": "echo 'Validation Result:\n'; cross-env NODE_ENV=development time ts-node --transpile-only scripts/dev/validate.ts",
"dev:validate:watch": "nodemon --exec 'yarn dev:validate'"
},
"devDependencies": {
......
......@@ -49,6 +49,20 @@ async function runBuild(): Promise<void> {
}
}
async function runDevScripts(): Promise<void> {
const spinner = ora('Running dev scripts...').start()
try {
await run('yarn dev:load:es6')
await run('yarn dev:load:commonjs')
await run('yarn dev:validate')
spinner.succeed(chalk.bold('Dev scripts: 👍'))
} catch (error) {
spinner.fail(chalk.bold('Dev scripts: 👎'))
throw new Error(error)
}
}
async function printTodos(): Promise<void> {
const spinner = ora('️Searching for open TODOs and FIXMEs...').start()
......@@ -69,6 +83,7 @@ async function main(): Promise<void> {
await runLinters()
await runTests()
await runBuild()
await runDevScripts()
await printTodos()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment