For users following the Updating the kit guidance or via the GitHub 'Use this template' button, they now see built CSS served from /css /assets/sass because NHS.UK prototype kit v8 preserves the input/output directories
We could bring these into line with the convention for NHS.UK frontend?
May need to update guidance too.
Before in v7
Other than images, output directories could not be determined easily:
| Source |
Destination |
URL path |
app/assets/images |
public/images |
/images |
app/assets/sass |
public/css |
/css |
app/assets/javascript |
public/js |
/js |
After in v8
Output directories can now be determined easily but /assets/sass is unexpected for built CSS:
| Source |
Destination |
URL path |
app/assets/images |
Not built (routed from source) |
/assets/images |
app/assets/sass |
public/assets/sass |
/assets/sass |
app/assets/javascript |
public/assets/javascript |
/assets/javascript |
Note: Images and other assets are automatically routed from source without a build step
public/* → URL path /*
app/assets/* → URL path /assets/*
app/images/* → URL path /images/*
e.g. Making a request for /assets/manifest.json will try these files on disk, in order:
public/assets/manifest.json
app/assets/manifest.json
Custom entryPoints
Although using buildOptions.entryPoints you can actually set these up however you prefer:
| Source |
Destination |
URL path |
app/assets/images |
Not built (routed from source) |
/assets/images |
app/stylesheets |
public/stylesheets |
/stylesheets |
app/javascripts |
public/javascripts |
/javascripts |
For users following the Updating the kit guidance or via the GitHub 'Use this template' button, they now see built CSS served from
/css/assets/sassbecause NHS.UK prototype kit v8 preserves the input/output directoriesWe could bring these into line with the convention for NHS.UK frontend?
May need to update guidance too.
Before in v7
Other than images, output directories could not be determined easily:
app/assets/imagespublic/images/imagesapp/assets/sasspublic/css/cssapp/assets/javascriptpublic/js/jsAfter in v8
Output directories can now be determined easily but
/assets/sassis unexpected for built CSS:app/assets/images/assets/imagesapp/assets/sasspublic/assets/sass/assets/sassapp/assets/javascriptpublic/assets/javascript/assets/javascriptNote: Images and other assets are automatically routed from source without a build step
public/*→ URL path/*app/assets/*→ URL path/assets/*app/images/*→ URL path/images/*e.g. Making a request for
/assets/manifest.jsonwill try these files on disk, in order:public/assets/manifest.jsonapp/assets/manifest.jsonCustom
entryPointsAlthough using
buildOptions.entryPointsyou can actually set these up however you prefer:app/assets/images/assets/imagesapp/stylesheetspublic/stylesheets/stylesheetsapp/javascriptspublic/javascripts/javascripts