/* This script generates mock data for local development.
   This way you don't have to point to an actual API,
   but you can enjoy realistic, but randomized data,
   and rapid page loads due to local, static data.
 */
import jsf from 'json-schema-faker';
import {schema} from './mockDataSchema';
import fs from 'fs';
import chalk from 'chalk';

const json = JSON.stringify(jsf(schema));

fs.writeFile("./src/api/db.json", json, function (err) {
  if (err) {
    return console.log(chalk.red(err));
  } else {
    console.log(chalk.green("Mock data generated: " + json));
  }
});

@@ -213,16 +213,50 @@
 ta.%0A */%0A
+%0A/* eslint-disable no-console */%0A%0A
 import j
@@ -590,18 +590,10 @@
 ated
-: %22 + json
+.%22
 ));%0A

Simplify messaging.