add clear all
This commit is contained in:
parent
96854572a0
commit
28d647861a
10 changed files with 253 additions and 33 deletions
|
|
@ -1,14 +1,33 @@
|
|||
const chalk = require('chalk')
|
||||
if (!process.env.FAUNADB_SECRET) {
|
||||
console.log('Please set supply a faunaDB server key')
|
||||
console.log(`
|
||||
var util = require('util');
|
||||
var exec = require('child_process').exec;
|
||||
|
||||
function clear(){
|
||||
exec('clear', function(error, stdout, stderr){
|
||||
util.puts(stdout);
|
||||
});
|
||||
}
|
||||
function checkForFaunaKey() {
|
||||
if (!process.env.FAUNADB_SECRET) {
|
||||
console.log(chalk.yellow('Required FAUNADB_SECRET enviroment variable not found.'))
|
||||
console.log(`
|
||||
=========================
|
||||
|
||||
In your terminal run the following command
|
||||
|
||||
export FAUNADB_SECRET=abcYourKeyHere
|
||||
export FAUNADB_SECRET=YourFaunaDBKeyHere
|
||||
|
||||
=========================
|
||||
`)
|
||||
process.exit(1)
|
||||
|
||||
process.exit(1)
|
||||
process.stdout.write('\u001b[2J')
|
||||
process.stdout.write('\u001b[1;1H')
|
||||
}
|
||||
}
|
||||
|
||||
process.on('exit', (err) => {
|
||||
console.log('errr')
|
||||
});
|
||||
|
||||
checkForFaunaKey()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue