Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
24
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# (Keep the version in sync with the node install below)
FROM node:22 AS frontend
FROM node:24 AS frontend

# Install front-end dependencies.
COPY package.json package-lock.json tsconfig.json webpack.config.js ./
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This is the source code to [Wagtail's website](https://wagtail.org)

## Requirements

- Docker or Vagrant (see below)
- [Fabric](https://www.fabfile.org/), [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) and [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) (only for downloading production / staging data)
- Docker or Vagrant (see below)
- [Fabric](https://www.fabfile.org/), [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) and [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) (only for downloading production / staging data)

## Installation (Docker Compose)

Expand Down Expand Up @@ -106,36 +106,36 @@ vagrant ssh

Common Vagrant commands:

- `vagrant up` starts the VM
- `vagrant halt` stops the VM
- `vagrant ssh` opens a shell in the VM
- `vagrant destroy` deletes the VM
- `vagrant up` starts the VM
- `vagrant halt` stops the VM
- `vagrant ssh` opens a shell in the VM
- `vagrant destroy` deletes the VM

Shortcut commands:

Within the VM shell, you can run `./manage.py` to run any Django management command. But we have added a couple of shortcuts to save on typing:

- `dj <command> [args]` - Runs a management command (eg, `dj shell`)
- `djrun` - Starts the webserver on port 8000
- `dj <command> [args]` - Runs a management command (eg, `dj shell`)
- `djrun` - Starts the webserver on port 8000

## Frontend tooling (Docker and Vagrant)

During the initial setup, you will need to build the frontend assets:

- `nvm use` to use the suggested node version (requires [nvm](https://github.com/nvm-sh/nvm), [fnm](https://github.com/Schniz/fnm) or similar. You'll also need to run `nvm install` to install and activate the version of node required for the project)
- `npm i` to install dependencies
- `npm run build` to compile CSS & JS
- `nvm use` to use the suggested node version (requires [nvm](https://github.com/nvm-sh/nvm), [fnm](https://github.com/Schniz/fnm) or similar. You'll also need to run `nvm install` to install and activate the version of node required for the project)
- `npm i` to install dependencies
- `npm run build` to compile CSS & JS

If you are editing frontend assets, you will also need to rebuild assets while
you edit:

- `npm run start` start the Webpack build in watch mode, without live-reload
- `npm run start:reload` start the Webpack server build on port 3000 with live-reload
- `npm run start` start the Webpack build in watch mode, without live-reload
- `npm run start:reload` start the Webpack server build on port 3000 with live-reload

Other common commands:

- `npm run lint` lint JS & CSS files
- `npm run format` format files
- `npm run lint` lint JS & CSS files
- `npm run format` format files

For more info see [Frontend general info](docs/frontend/general-info.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/data_protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ $ python manage.py shell

If a request is received to purge or report the stored data for a given user:

- For user account data, delete the user from the Wagtail admin
- For form submissions, search the submissions and delete if necessary using the Django shell.
- For user account data, delete the user from the Wagtail admin
- For form submissions, search the submissions and delete if necessary using the Django shell.
26 changes: 13 additions & 13 deletions docs/frontend/general-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

## What's included

- [Sass](http://sass-lang.com/) CSS with [auto-prefixing](https://github.com/postcss/autoprefixer).
- [TypeScript](https://www.typescriptlang.org/) for ES2015+ JavaScript, and TypeScript support.
- [webpack-dev-server](https://v4.webpack.js.org/configuration/dev-server/) for autoreloading.
- [Webpack](https://webpack.js.org/) for module bundling.
- With `ts-loader` to process JavaScript and TypeScript.
- With `css-loader`, `postcss-loader`, and `sass-loader` to process stylesheets.
- CSS linting with `stylelint`
- JS linting with `eslint`
- [Sass](http://sass-lang.com/) CSS with [auto-prefixing](https://github.com/postcss/autoprefixer).
- [TypeScript](https://www.typescriptlang.org/) for ES2015+ JavaScript, and TypeScript support.
- [webpack-dev-server](https://v4.webpack.js.org/configuration/dev-server/) for autoreloading.
- [Webpack](https://webpack.js.org/) for module bundling.
- With `ts-loader` to process JavaScript and TypeScript.
- With `css-loader`, `postcss-loader`, and `sass-loader` to process stylesheets.
- CSS linting with `stylelint`
- JS linting with `eslint`

## Developing with it

- To start the development environment, follow instruction in README.md in the project root
- Source files for developing your project are in `static` and the distribution folder for the compiled assets is `static_compiled`. Don't make direct changes to the `static_compiled` directory as they will be overwritten.
- To start the development environment, follow instruction in README.md in the project root
- Source files for developing your project are in `static` and the distribution folder for the compiled assets is `static_compiled`. Don't make direct changes to the `static_compiled` directory as they will be overwritten.

# Django Pattern Library

Expand All @@ -28,8 +28,8 @@ The site uses icons throughout the build, a comprehensive list can be found [in

The site uses a grid system across 3 breakpoints:

- Large: 2 gutter columns, 5 main columns
- Medium: 2 gutter columns, 3 main columns
- Small: 2 gutter columns, 2 main columns
- Large: 2 gutter columns, 5 main columns
- Medium: 2 gutter columns, 3 main columns
- Small: 2 gutter columns, 2 main columns

To use the system wrap a component in `<div class="grid">` and then align your component accordingly.
4 changes: 2 additions & 2 deletions docs/infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fab pull-production-media

## Cache

- Application cache: Redis (Heroku Key-Value Store, Mini)
- CDN cache: Cloudflare
- Application cache: Redis (Heroku Key-Value Store, Mini)
- CDN cache: Cloudflare

## File storage

Expand Down
Loading