Socket
Socket
Sign inDemoInstall

govuk-frontend

Package Overview
Dependencies
0
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.7.0 to 5.0.0-beta.0

dist/govuk-prototype-kit/init.js

30

govuk-prototype-kit.config.json
{
"meta": {
"description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
"urls": {
"documentation": "https://design-system.service.gov.uk/",
"releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.0.0-beta.0",
"versionHistory": "https://github.com/alphagov/govuk-frontend/releases"
}
},
"assets": [
"/govuk/assets",
"/govuk/all.js.map"
"/dist/govuk/assets",
"/dist/govuk/govuk-frontend.min.js.map"
],
"sass": [
"/govuk-prototype-kit/init.scss"
"/dist/govuk-prototype-kit/init.scss"
],
"scripts": [
"/govuk/all.js",
"/govuk-prototype-kit/init.js"
{
"path": "/dist/govuk/govuk-frontend.min.js",
"type": "module"
},
{
"path": "/dist/govuk-prototype-kit/init.js",
"type": "module"
}
],

@@ -139,2 +153,6 @@ "nunjucksMacros": [

{
"importFrom": "govuk/components/task-list/macro.njk",
"macroName": "govukTaskList"
},
{
"importFrom": "govuk/components/textarea/macro.njk",

@@ -149,4 +167,4 @@ "macroName": "govukTextarea"

"nunjucksPaths": [
"/"
"/dist"
]
}

78

package.json
{
"name": "govuk-frontend",
"description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
"version": "4.7.0",
"main": "govuk/all.js",
"module": "govuk-esm/all.mjs",
"sass": "govuk/all.scss",
"version": "5.0.0-beta.0",
"main": "dist/govuk/all.bundle.js",
"module": "dist/govuk/all.mjs",
"sass": "dist/govuk/all.scss",
"files": [
"dist",
"govuk-prototype-kit.config.json",
"package.json",
"README.md"
],
"exports": {
".": {
"sass": "./govuk/all.scss",
"import": "./govuk-esm/all.mjs",
"require": "./govuk/all.js"
"sass": "./dist/govuk/all.scss",
"import": "./dist/govuk/all.mjs",
"require": "./dist/govuk/all.bundle.js",
"default": "./dist/govuk/all.bundle.js"
},
"./govuk/": "./govuk/",
"./govuk/*": "./govuk/*",
"./govuk-esm/": "./govuk-esm/",
"./govuk-esm/*": "./govuk-esm/*",
"./*": "./*",
"./dist/": "./dist/",
"./govuk-prototype-kit.config.json": "./govuk-prototype-kit.config.json",
"./package.json": "./package.json"
},
"sideEffects": [
"govuk-esm/vendor/**"
],
"engines": {

@@ -44,3 +47,48 @@ "node": ">= 4.2.0"

],
"license": "MIT"
"license": "MIT",
"scripts": {
"dev": "gulp dev --color",
"prebuild:package": "npm run clean:package",
"prebuild:release": "npm run clean:release",
"build": "npm run build:package",
"build:package": "gulp build:package --color",
"build:release": "gulp build:release --color",
"build:stats": "npm run stats --workspace @govuk-frontend/stats",
"build:types": "tsc --build tsconfig.build.json",
"clean": "npm run clean:package",
"clean:package": "del-cli *.tsbuildinfo dist govuk-prototype-kit.config.json",
"clean:release": "del-cli ../../dist --force",
"postbuild:package": "npm run build:stats && govuk-prototype-kit validate-plugin .",
"version": "echo $npm_package_version"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-replace": "^5.0.4",
"@rollup/plugin-terser": "^0.4.4",
"autoprefixer": "^10.4.16",
"cssnano": "^6.0.1",
"cssnano-preset-default": "^6.0.1",
"govuk-prototype-kit": "^13.13.5",
"gulp": "^4.0.2",
"gulp-cli": "^2.3.0",
"html-validate": "8.7.0",
"nunjucks": "^3.2.4",
"outdent": "^0.8.0",
"postcss": "^8.4.31",
"postcss-scss": "^4.0.9",
"puppeteer": "^21.4.1",
"rollup": "^4.1.4",
"sass-color-helpers": "^2.1.1",
"sass-embedded": "^1.69.4",
"sassdoc": "^2.7.4",
"slash": "^5.1.0"
},
"optionalDependencies": {
"@govuk-frontend/config": "*",
"@govuk-frontend/helpers": "*",
"@govuk-frontend/lib": "*",
"@govuk-frontend/tasks": "*"
}
}

@@ -40,3 +40,3 @@ # GOV.UK Frontend

```scss
@import "node_modules/govuk-frontend/govuk/all";
@import "node_modules/govuk-frontend/dist/govuk/all";
```

@@ -50,17 +50,20 @@

accessibility of the components. You should make sure that you are importing and
initialising Javascript in your application to ensure that all users can use it successfully.
initialising JavaScript in your application. This will ensure all users can use it successfully.
You can include Javascript for all components either by copying the `all.js` from `node_modules/govuk-frontend/govuk/` into your application or referencing the file directly:
You can include JavaScript for all components by copying both `govuk-frontend.min.js` and `govuk-frontend.min.js.map` from `node_modules/govuk-frontend/dist/govuk/` into your application and referencing the JavaScript directly:
```html
<script src="<path-to-govuk-frontend-all-file>/all.js"></script>
<script type="module" src="{path-to-javascript}/govuk-frontend.min.js"></script>
```
Next you need to initialise the script by adding:
Next you need to import and initialise GOV.UK Frontend by adding:
```html
<script>window.GOVUKFrontend.initAll()</script>
<script type="module">
import { initAll } from '{path-to-javascript}/govuk-frontend.min.js'
initAll()
</script>
```
[More details on importing Javascript and advanced options](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#javascript)
[More details on importing JavaScript and advanced options](https://frontend.design-system.service.gov.uk/importing-css-assets-and-javascript/#javascript)

@@ -91,2 +94,2 @@ ## Importing assets

If you want to help us build GOV.UK Frontend, view our [contribution guidelines](../CONTRIBUTING.md).
If you want to help us build GOV.UK Frontend, view our [contribution guidelines](/CONTRIBUTING.md).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc