Skip to content

Commit

Permalink
Better terminal UX
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed Sep 21, 2017
1 parent 315aacf commit de9b28d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion desktop/webpack/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default class App extends Component {
render () {
return (
<div>
hi
hey
</div>
)
}
Expand Down
7 changes: 3 additions & 4 deletions lib/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ app.use(require('webpack-hot-middleware')(compiler, {
}))
app.use(require('webpack-dev-middleware')(compiler, {
quiet: true,
// noInfo: true,
publicPath: config.output.publicPath,
serverSideRender: true,
// stats: {
// colors: true
// }
stats: {
colors: true
}
}))

app.get('/webpack', (req, res, next) => {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"acceptance-record": "sh scripts/acceptance_record.sh",
"assets": "sh scripts/assets.sh",
"deploy": "sh scripts/deploy.sh",
"dev": "sh scripts/dev.sh",
"mocha": "sh scripts/mocha.sh",
"start": "sh scripts/start.sh",
"test": "sh scripts/test.sh"
Expand Down
5 changes: 5 additions & 0 deletions scripts/dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# !/usr/bin/bash

set -e -x

node -r dotenv/config --max_old_space_size=1024 .
2 changes: 1 addition & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e -x

forever -c 'node -r dotenv/config --max_old_space_size=1024' .
forever -c 'node -r dotenv/config --max_old_space_size=1024' . --colors
11 changes: 9 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ const WebpackNotifierPlugin = require('webpack-notifier')
const path = require('path')
const webpack = require('webpack')

const { NODE_ENV } = process.env
const {
NODE_ENV,
PORT
} = process.env

const config = {
devtool: 'eval',
Expand All @@ -29,7 +32,11 @@ const config = {
]
},
plugins: [
new FriendlyErrorsWebpackPlugin(),
new FriendlyErrorsWebpackPlugin({
compilationSuccessInfo: {
messages: [`[Force] Listening on http://localhost:${PORT} \n`]
}
}),
new ProgressBarPlugin(),
new WebpackNotifierPlugin(),
new webpack.DefinePlugin({
Expand Down

0 comments on commit de9b28d

Please sign in to comment.