add omnipotent prebuild for database setup

This commit is contained in:
DavidWells 2018-06-20 20:54:56 -07:00
parent 46ff0b0db3
commit ab4a2eb423
2 changed files with 2 additions and 1 deletions

View file

@ -14,6 +14,7 @@
"start": "npm-run-all --parallel checkForFaunaKey startApp startServer", "start": "npm-run-all --parallel checkForFaunaKey startApp startServer",
"startApp": "react-scripts start", "startApp": "react-scripts start",
"startServer": "netlify-lambda serve functions -c ./webpack.config.js", "startServer": "netlify-lambda serve functions -c ./webpack.config.js",
"prebuild": "echo 'setup faunaDB' && npm run bootstrap",
"build": "npm-run-all --parallel build:**", "build": "npm-run-all --parallel build:**",
"build:app": "react-scripts build", "build:app": "react-scripts build",
"build:functions": "netlify-lambda build functions -c ./webpack.config.js", "build:functions": "netlify-lambda build functions -c ./webpack.config.js",

View file

@ -8,7 +8,7 @@ function clear(){
}); });
} }
function checkForFaunaKey() { function checkForFaunaKey() {
if (!process.env.FAUNADB_SECRETz) { if (!process.env.FAUNADB_SECRET) {
console.log(chalk.yellow('Required FAUNADB_SECRET enviroment variable not found.')) console.log(chalk.yellow('Required FAUNADB_SECRET enviroment variable not found.'))
console.log(` console.log(`
========================= =========================