Skip to content

Commit

Permalink
Move webpack from post-install to yarn start
Browse files Browse the repository at this point in the history
Fixes #149.
  • Loading branch information
osteele committed May 17, 2018
1 parent 8b26bb6 commit 036ca64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node server.js
web: yarn start
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "([ -f .env ] || $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",
Expand Down
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 036ca64

Please sign in to comment.