Skip to content
⍺⁴𝙻
Branch: master
Clone or download
Latest commit 9f356ee Apr 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.prbuilds Fixes to prbuilds config Nov 26, 2018
.vscode Update README (Auto fix on save) Mar 18, 2019
__mocks__ add CookieBanner tests Nov 6, 2018
docs
fixtures fix tests and tidy code Mar 18, 2019
packages Remove outdated comment Apr 24, 2019
scripts Update build-riffraff-bundle.js Apr 10, 2019
.codeclimate.json dupliction is fine Jan 4, 2019
.editorconfig pull request feedback changes Jan 4, 2019
.gitignore move Apr 9, 2019
.nvmrc ?? Apr 9, 2019
.prettierrc rejig Apr 19, 2018
.stylelintrc
LICENSE license Apr 20, 2018
README.md A documentation note on rebasing on master Mar 21, 2019
babel.config.js move frontend to packages Nov 22, 2018
index.d.ts add polyfill.io callback Nov 6, 2018
makefile up versions Feb 19, 2019
package.json upgrade typescript to 3.3.3 Feb 12, 2019
tsconfig.json move frontend to packages Nov 22, 2018
tslint.json Move bullet cleaner out Feb 20, 2019
yarn.lock Add background parameters to close button Apr 12, 2019

README.md

dotcom-rendering Known Vulnerabilities

Frontend rendering framework for theguardian.com. It uses React, with Emotion for styling.

Chat

Check out the Digital/dotcom-rendering channel on Chat. If you haven't already done so already, please ask the Dotcom Platform team for an invite.

Quick start

This guide will help you get the dotcom-rendering application running on your development machine.

Install Node.js

The only thing you need to make sure you have installed before you get going is Node.js.

We recommend using nvm (especially combined with this handy gist). It is great at managing multiple versions of Node.js on one machine.

Running instructions

$ git clone git@github.com:guardian/dotcom-rendering.git
$ cd dotcom-rendering
$ make dev

This will start the development server on port 3030: http://localhost:3030.

Detailed Setup

If you're new to JavaScript projects, if you're trying to integrate with other applications or if you prefer to take things slow, we also have a more detailed setup guide.

Note on rebasing

The dotcom-rendering github account is set up to enforce rebasement on the master branch before merging. If you are working on a feature branch and plan to make a PR, please avoid merging from master during your work and, instead, always rebase on master. The reason is that if you simply merge from master, then when the time to rebase on master comes any conflicts you may have had to correct will show up again thereby duplicating your efforts.

Feedback

After completing this setup guide, we would greatly appreciate it if you could complete our dotcom-rendering setup questionnaire. It should only take 3 minutes and will help us improve this documentation and the setup process in the future. Thank you! 🙏

Other tasks

You can ensure your code passes code quality tests by running:

$ make validate

This runs our linting tool, the TypeScript compiler and our tests, before finally building the bundles.

You can also run these tasks individually:

$ make lint
$ make tsc
$ make test

If you get lint errors, you can attempt to automatically fix them with:

$ make fix

See the makefile for the full list.

IDE setup

We recommend using VSCode.

Extensions

VSCode should prompt you to install our recommended extensions when you open the project.

You can also find these extensions by searching for @recommended in the extensions pane.

Auto fix on save

We recommend you update your workspace settings to automatically fix formatting errors on save, this avoids code style validation failures. These instructions assume you have installed the esbenp.prettier-vscode VSCode plugin:

  1. Open the Command Palette (shift + cmd + P) and type >Preferences: Open Settings (JSON)
  2. Add the key value "tslint.autoFixOnSave": true,
You can’t perform that action at this time.