using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
function ReloadPlugin() {} | |
ReloadPlugin.prototype.apply = compiler => { | |
ReloadPlugin.watching = false | |
compiler.plugin('watch-run', (p, cb) => { | |
ReloadPlugin.watching = true | |
cb() | |
}) |
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
Install Package Control for easy package management.
- Open the console with
Ctrl+`
- Paste in the following:
- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
var OFF = 0, WARN = 1, ERROR = 2; | |
module.exports = exports = { | |
"env": { | |
"es6": true | |
}, | |
"ecmaFeatures": { | |
// env=es6 doesn't include modules, which we are using | |
"modules": true |
Directory Structure
.
|-- dist/
|-- src/
|-- test/
| `-- setup.jsx # jsdom for renderIntoDocument()
|-- .babelrc
|-- .coveralls.yml
So you love the Operator Mono font? I don't blame you! So do we! It's a bit pricey but worth every penny.
In fact, we're so used to it in our editors that we were a bit sad with GitHub's otherwise neat code views. When we review PRs in the web UI, we want our Operator Mono!
So, assuming you have it installed on your machine, you can put the JS bit in the other code snippet of this Gist in a bookmarklet, and click it when you're on a GitHub.com page you want to have switch over to our beloved font. We used the ScreenSmart variant here, which you get in the font package and have probably installed, as it's the more legible one on screens. Feel free to adjust the font name if needed.