Skip to content

Update stylesheet and javascript folder names/paths in template repository #722

@frankieroberto

Description

@frankieroberto

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:

  1. public/assets/manifest.json
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions