feat: simplify development setup

Warns if .env is missing.  Combines the three docker installation
commands into one, updating the docs accordingly.

Also removes the libcimp patch as npm already has it.
This commit is contained in:
Oliver Eyton-Williams
2019-11-28 18:01:52 +01:00
committed by mrugesh
parent 647e25aa7c
commit e3b77a62cc
5 changed files with 8 additions and 22 deletions

View File

@ -1,7 +1,11 @@
const path = require('path');
const fs = require('fs');
if (process.env.FREECODECAMP_NODE_ENV !== 'production') {
const envPath = path.resolve(__dirname, '../.env');
if (!fs.existsSync(envPath)) {
throw Error('.env not found, please copy sample.env to .env.');
}
require('dotenv').config({ path: envPath });
}