From 359809a54449339a06f551fc8adbf1b4a849f4a0 Mon Sep 17 00:00:00 2001 From: Oliver Steele Date: Wed, 16 May 2018 10:10:17 -0400 Subject: [PATCH] Move webpack from post-install to yarn start Fixes #145 --- package.json | 3 +-- server.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4fd7e89..c2d949a 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "scripts": { "clean": "rimraf bundle.js bundle.js.map", "build": "webpack --config=webpack.config.js -p", - "postinstall": "$npm_execpath run clean && $npm_execpath run build", - "start": "node server.js", + "start": "$npm_execpath run build && node server.js", "dev": "webpack-dev-server --inline --hot", "lint": "$npm_execpath run lint:js && $npm_execpath run lint:markdown", "lint:js": "eslint --cache --ext .js,.jsx src *.js", diff --git a/server.js b/server.js index ffb2d94..4c4283f 100644 --- a/server.js +++ b/server.js @@ -10,6 +10,7 @@ app.use(bodyParser.json({ type: 'application/*+json' })); app.use(express.static(__dirname)); // Check if we're running on a local dev machine +// TODO: Remove use of .env. Change instructions to direct users to direnv if (fs.existsSync('./.env')) { // Load environment variables from .env require('dotenv').config();