Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Commit

Permalink
Merge pull request #82 from davezuko/development-mode
Browse files Browse the repository at this point in the history
feat(dev): flips dev and dev:debug so debug mode is now enabled by de…
  • Loading branch information
David Zukowski committed Sep 15, 2015
2 parents 64ec424 + 5d1ecb5 commit 35b2e94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
21 changes: 7 additions & 14 deletions README.md
Expand Up @@ -33,8 +33,8 @@ Features
* [react-router](https://github.com/rackt/react-router) (`1.0.0-rc1`)
* [Redux](https://github.com/gaearon/redux) (`^3.0.0`)
* react-redux
* redux-devtools (enabled with `--debug` flag)
* or try `npm run dev:debugnw` to display it in a separate window.
* redux-devtools
* use `npm run dev:nw` to display in a separate window.
* [Koa](https://github.com/koajs/koa)
* [Immutable.js](https://github.com/facebook/immutable-js)
* [Karma](https://github.com/karma-runner/karma)
Expand All @@ -60,11 +60,11 @@ Usage
#### `npm run dev` also `npm start`
Runs the webpack build system just like in `compile` but enables HMR. The webpack dev server can be found at `localhost:3000`.

#### `npm run dev:debug`
Same as `npm run dev` but enables `--debug` flag automatically (this will enable redux-devtools).
#### `npm run dev:nw`
Same as `npm run dev` but opens the debug tools in a new window.

#### `npm run dev:debugnw`
Same as `npm run dev:debug` but opens the debug tools in a new window.
#### `npm run dev:no-debug`
Same as `npm run dev` but disables devtools.

#### `npm run compile`
Runs the Webpack build system with your current NODE_ENV and compiles the application to disk (`~/dist`). Production builds will fail on eslint errors (but not on warnings).
Expand Down Expand Up @@ -240,11 +240,4 @@ Deployment
Troubleshooting
---------------

### `--debug` isn't working
If you're using one of the pre-configured npm scripts, make sure you follow npm's syntax:

`npm run [command] [-- <args>]`

As an example, `npm run compile` would look like this:

`npm run compile -- --debug`
Nothing yet. Having an issue? Report it and I'll get to it as soon as possible!
2 changes: 1 addition & 1 deletion config/index.js
Expand Up @@ -50,7 +50,7 @@ config.set('globals', {
'NODE_ENV' : config.get('env'),
'__DEV__' : config.get('env') === 'development',
'__PROD__' : config.get('env') === 'production',
'__DEBUG__' : !!argv.debug,
'__DEBUG__' : config.get('env') === 'development' && !argv.no_debug,
'__DEBUG_NW__' : !!argv.nw
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -8,8 +8,8 @@
"compile": "webpack",
"start": "npm run dev",
"dev": "node --harmony bin/webpack-dev-server",
"dev:debug": "npm run dev -- --debug",
"dev:debugnw": "npm run dev -- --debug --nw",
"dev:nw": "npm run dev -- --nw",
"dev:no-debug": "npm run dev -- --no_debug",
"test": "npm run test:unit && npm run test:server",
"test:unit": "node ./node_modules/karma/bin/karma start",
"test:server": "mocha --harmony bin/test-server",
Expand Down

0 comments on commit 35b2e94

Please sign in to comment.