Skip to content

Commit

Permalink
Add sass via npm to compile stylesheets
Browse files Browse the repository at this point in the history
This allows us to pass variables to the design system, and will make
updating easier.

Use this to apply the design system styles globally, so that parts of
the search result page can be rendered from markdown. If we want to
restrict this more later, we can write more specific selectors that extend
the GOV.UK styles, like this:
https://github.com/ministryofjustice/cjs_scorecard_exploratory_analysis/blob/develop/cjs_test_app/scss/markdown-styles.scss

I've set up the package.json so we manually run `npm run sass` when we
want to recompile the sass. I figure this is probably good enough for us
as we won't need to change stylesheets very often.
  • Loading branch information
MatMoore committed Jan 24, 2024
1 parent 4166849 commit a8d2ee3
Show file tree
Hide file tree
Showing 675 changed files with 243,192 additions and 177 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
## Quick start

Project contains a poetry dependency file for installation with `poetry install`
To run `poetry run python manage.py runserver`
You will need `npm` (for javascript dependencies) and poetry (for python dependencies).

## Configuration

The following should be set using environment variables:

- CATALOGUE_URL
- CATALOGUE_TOKEN
1. Run `npm install` and then `npm run sass` to compile the stylesheets.
2. Run `poetry install` to install python dependencies
3. Set environment variables CATALOGUE_URL and CATALOGUE_TOKEN (TODO: add dotenv support)
4. Run `poetry run python manage.py runserver`

## Current Endpoints

Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/sass

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

244 changes: 244 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions node_modules/@ministryofjustice/frontend/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a8d2ee3

Please sign in to comment.