-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3833 from alphagov/es-module-import
- Loading branch information
Showing
24 changed files
with
102 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
import * as GOVUKFrontend from 'govuk-frontend' | ||
|
||
// @ts-expect-error Manually add globals to window for tests | ||
window.GOVUKFrontend = GOVUKFrontend | ||
export * from 'govuk-frontend' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 20 additions & 12 deletions
32
packages/govuk-frontend-review/src/views/tests/boilerplate.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Test Boilerplate</title> | ||
<link rel="stylesheet" href="/stylesheets/app.min.css"> | ||
</head> | ||
<body class="govuk-template__body"> | ||
<script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script> | ||
{% extends "component-preview.njk" %} | ||
|
||
{% set pageTitle = "Test boilerplate" %} | ||
{% block pageTitle %}{{ pageTitle }} - GOV.UK{% endblock %} | ||
|
||
{% block head %} | ||
{{ super() }} | ||
<script type="importmap"> | ||
{ "imports": { "govuk-frontend": "/javascripts/all.bundle.min.mjs" } } | ||
</script> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="app-whitespace-highlight"> | ||
<h1 class="govuk-heading-l">Test boilerplate</h1> | ||
<p class="govuk-body"> | ||
Used during testing to inject rendered components and test specific configurations | ||
</p> | ||
<div id="slot"></div> | ||
<script type="module" src="/javascripts/all.min.js"></script> | ||
</body> | ||
</html> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block bodyEnd %} | ||
<script type="module" src="/javascripts/all.bundle.min.mjs"></script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"include": ["**/*.js", "**/*.mjs", "../config", "../lib"] | ||
"include": [ | ||
"**/*.js", | ||
"**/*.mjs", | ||
"../config", | ||
"../lib", | ||
"../../packages/govuk-frontend" | ||
], | ||
"exclude": ["./dist/**", "../../packages/govuk-frontend/dist/**"] | ||
} |
4 changes: 2 additions & 2 deletions
4
shared/tasks/helpers/task-arguments.mjs → shared/tasks/helpers/task-arguments.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import parser from 'yargs-parser' | ||
const parser = require('yargs-parser') | ||
|
||
// Non-flag arguments as tasks | ||
const { _: tasks } = parser(process.argv) | ||
|
||
// Check for development task | ||
export const isDev = tasks.includes('dev') | ||
module.exports.isDev = tasks.includes('dev') |
Oops, something went wrong.