Verify breaking news online.
This is the web client of Check.
- Node.js (tested with version 6.9.2) and NPM modules as defined in package.json
- Ruby and RubyGems (to run the tests)
- Optional: Inkscape and ImageMagick (to generate the favicon)
- Optional: Guard, Guard-Livereload and the LiveReload browser extension (for an autorefreshing browser in dev mode)
Using Dev mode
The dev mode build (
npm run build:dev.) is intended to be used instead of the existing "full build" (
npm run build) during local development. The dev mode reduces build time primarily by enabling webpack's
watch feature, which uses caching and auto-rebuilding. It also disables sourcemaps by default.
npm run build:dev.
- This runs the compiler. It monitors for changes, automatically triggering a rebuild. Press Ctrl+C to stop.
- The script is defined in package.json — it uses both gulp and webpack
Dev mode with LiveReload
In dev mode can optionally use guard-livereload for cross-browser live-reloading, as configured in
npm run build:devper above.
- Install the LiveReload browser extension
- Install Guard and Guard-livereload gems with bundler:
- Run guard:
cd check-app/check-web && bundle exec guard
- Open localhost:3333 and turn on the browser extension (click it).
- You should see "Browser connected" in the Guard window.
- When you save a .js file, build:dev rebuilds, then Guard notices the new bundle and triggers LiveReload. The page automatically refreshes and reflects your js changes.
Installation without Docker
config.jsand define your runtime configurations
config-build.jsand define your build-time configurations (optional)
config-server.jsand define your server configurations
npm run build
SERVER_PORT=3333 npm run publish(which basically serves the contents from
- Open your browser and go to http://localhost:3333
- For better debugging, set your
NODE_ENVenvironment variable to
Translations are managed in Transifex. All the contents are stored in the
localization directory which contains the following subfolders:
localization/react-intl: Contains the files extracted by
localization/transifex: Contains the files above, but converted to Transifex JSON format
localization/translations: Contains the translations files downloaded from Transifex plus a
translations.jsfile which concatenates all of them in a single JSON file used by
By default, the application is displayed in the browser's language using the files from
localization directory. If you want to work with other language or you want to exchange files with Transifex, you need to:
- Add a
localeentry to your
config.js. This is the locale for Check. If not present, falls back to browser locale.
config-build.js(if you don't have it yet) and add your Transifex user and password. If not present, instead of getting translations from Transifex and sending strings to it, it will use the static files at
Then you can use
npm run transifex:upload and
npm run transifex:download to upload and download translations, respectively.
- Compile the code with
npm run build
test/config.ymland set the configurations
test/config.jsand set the configurations
chromedriverand the application (
SERVER_PORT=3333 npm run publish)
npm run test:integration
- Use API calls (instead of using Selenium) to create all test data you need before the real thing that the test is testing
- Tag the test with one of the existing tags
npm run test:unit
If you don't have time to implement an integration test for your feature, please add a pending test for that, like this:
it "should do whatever my feature expects" do skip("Needs to be implemented") end
In order to implement a pending unit test, do this:
it("should do whatever my unit expects");
Notes and tips
npm install babel-register -gif you face errors related to
- Remove your
node_modulesdirectory if you face errors related to