diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index edeea9a64..b22922aee 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -35,8 +35,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEFAULT_BRANCH: main VALIDATE_ALL_CODEBASE: false + VALIDATE_CSS: false VALIDATE_GITHUB_ACTIONS: false VALIDATE_DOCKERFILE_HADOLINT: false + VALIDATE_JAVASCRIPT_STANDARD: false VALIDATE_JSCPD: false VALIDATE_PYTHON_MYPY: false VALIDATE_PYTHON_PYLINT: false diff --git a/Dockerfile b/Dockerfile index be0cafe18..122442d86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY jest.config.js controlpanel/frontend/static /src/ RUN npm install RUN mkdir -p dist &&\ ./node_modules/.bin/babel src/module-loader.js src/components src/javascripts -o dist/app.js -s -RUN ./node_modules/.bin/sass --load-path=node_modules/ --style=compressed src/app.scss:dist/app.css +RUN ./node_modules/.bin/sass --load-path=./ --style=compressed src/app.scss:dist/app.css WORKDIR /src RUN /node_modules/.bin/jest @@ -69,6 +69,10 @@ COPY tests tests # install javascript dependencies COPY --from=build-node dist/app.css dist/app.js static/ +COPY --from=build-node node_modules/govuk-frontend/dist/govuk/assets/fonts/. static/assets/fonts +COPY --from=build-node node_modules/govuk-frontend/dist/govuk/assets/images/. static/assets/images +COPY --from=build-node node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js static/assets/js/govuk-frontend.min.js +COPY --from=build-node node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map static/assets/js/govuk-frontend.min.js.map COPY --from=build-node node_modules/accessible-autocomplete/dist/ static/accessible-autocomplete COPY --from=build-node node_modules/govuk-frontend static/govuk-frontend COPY --from=build-node node_modules/@ministryofjustice/frontend/moj static/ministryofjustice-frontend diff --git a/Makefile b/Makefile index d7379a10d..c65327a44 100644 --- a/Makefile +++ b/Makefile @@ -58,13 +58,21 @@ build-static: build-css: mkdir static + mkdir -p static/assets/fonts + mkdir -p static/assets/images + cp -R node_modules/govuk-frontend/dist/govuk/assets/fonts/. static/assets/fonts + cp -R node_modules/govuk-frontend/dist/govuk/assets/images/. static/assets/images cp -R node_modules/accessible-autocomplete/dist/ static/accessible-autocomplete cp -R node_modules/govuk-frontend/ static/govuk-frontend cp -R node_modules/@ministryofjustice/frontend/ static/ministryofjustice-frontend cp -R node_modules/html5shiv/dist/ static/html5-shiv - ./node_modules/.bin/sass --load-path=node_modules/ --style=compressed controlpanel/frontend/static/app.scss:static/app.css + npm run css --load build-js: + mkdir -p static/assets/js + cp node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js static/assets/js/govuk-frontend.min.js + cp node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map static/assets/js/govuk-frontend.min.js.map + cp -R node_modules/jquery/dist/ static/jquery cp -R node_modules/jquery-ui/dist/ static/jquery-ui ./node_modules/.bin/babel \ diff --git a/controlpanel/frontend/jinja2/base.html b/controlpanel/frontend/jinja2/base.html index 29ca7d416..530bac928 100644 --- a/controlpanel/frontend/jinja2/base.html +++ b/controlpanel/frontend/jinja2/base.html @@ -145,7 +145,7 @@