From c39ada14fbf1b21c80f0d10e829c573e7c13455e Mon Sep 17 00:00:00 2001 From: Jani Kraner Date: Sun, 20 May 2018 18:56:12 +0100 Subject: [PATCH 1/3] Amend component readme template Update paths and remove unwanted sections --- app/views/layouts/readme.njk | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/app/views/layouts/readme.njk b/app/views/layouts/readme.njk index baadf77ca3..331ae86ff9 100644 --- a/app/views/layouts/readme.njk +++ b/app/views/layouts/readme.njk @@ -26,18 +26,6 @@ {{ showExamples(componentName, componentData) }} {% endblock %} -

Dependencies

- -

To consume the {{ componentName }} component you must be running npm version 5 or above.

- -

{% block componentDependencies %}{% endblock %}

- -

Installation

- -

-npm install --save @govuk-frontend/{{ componentName }}
-
-

Requirements

Build tool configuration

When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp

@@ -53,7 +41,7 @@ npm install --save @govuk-frontend/{{ componentName }} your app to show these assets. Below is a sample configuration using Express js:


-app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets')))
+app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets')))
 

Component arguments

@@ -67,27 +55,13 @@ app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-fro

Below is an example setup using express configure views:


-nunjucks.configure('node_modules/@govuk-frontend', {
+nunjucks.configure('node_modules/@govuk-frontend/frontend/components', {
   autoescape: true,
   cache: false,
   express: app
 })
 
-

Getting updates

- -

To check whether you have the latest version of the button run:

- -

-npm outdated @govuk-frontend/{{ componentName }}
-
- -

To update the latest version run:

- -

-npm update @govuk-frontend/{{ componentName }}
-
-

Contribution

Guidelines can be found at on our Github repository. From 2448f0e8ba549a6ece471033159e4a0bf3a79331 Mon Sep 17 00:00:00 2001 From: Jani Kraner Date: Sun, 20 May 2018 18:57:17 +0100 Subject: [PATCH 2/3] Update all component readmes --- src/components/back-link/README.md | 22 ++-------------------- src/components/breadcrumbs/README.md | 22 ++-------------------- src/components/button/README.md | 22 ++-------------------- src/components/checkboxes/README.md | 22 ++-------------------- src/components/date-input/README.md | 22 ++-------------------- src/components/details/README.md | 22 ++-------------------- src/components/error-message/README.md | 22 ++-------------------- src/components/error-summary/README.md | 22 ++-------------------- src/components/fieldset/README.md | 22 ++-------------------- src/components/file-upload/README.md | 22 ++-------------------- src/components/footer/README.md | 22 ++-------------------- src/components/hint/README.md | 22 ++-------------------- src/components/input/README.md | 22 ++-------------------- src/components/label/README.md | 22 ++-------------------- src/components/panel/README.md | 22 ++-------------------- src/components/phase-banner/README.md | 22 ++-------------------- src/components/radios/README.md | 22 ++-------------------- src/components/select/README.md | 22 ++-------------------- src/components/skip-link/README.md | 22 ++-------------------- src/components/table/README.md | 22 ++-------------------- src/components/tag/README.md | 22 ++-------------------- src/components/textarea/README.md | 22 ++-------------------- src/components/warning-text/README.md | 22 ++-------------------- 23 files changed, 46 insertions(+), 460 deletions(-) diff --git a/src/components/back-link/README.md b/src/components/back-link/README.md index e923a71b75..ef14280e7a 100644 --- a/src/components/back-link/README.md +++ b/src/components/back-link/README.md @@ -27,14 +27,6 @@ Find out when to use the Back link component in your service in the [GOV.UK Desi "text": "Back" }) }} -## Dependencies - -To consume the back-link component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/back-link - ## Requirements ### Build tool configuration @@ -49,7 +41,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -143,22 +135,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/back-link - -To update the latest version run: - - npm update @govuk-frontend/back-link - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/breadcrumbs/README.md b/src/components/breadcrumbs/README.md index d174ac48da..73250e783f 100644 --- a/src/components/breadcrumbs/README.md +++ b/src/components/breadcrumbs/README.md @@ -208,14 +208,6 @@ Find out when to use the Breadcrumbs component in your service in the [GOV.UK De ] }) }} -## Dependencies - -To consume the breadcrumbs component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/breadcrumbs - ## Requirements ### Build tool configuration @@ -230,7 +222,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -336,22 +328,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/breadcrumbs - -To update the latest version run: - - npm update @govuk-frontend/breadcrumbs - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/button/README.md b/src/components/button/README.md index b94236c19e..ef638d404d 100644 --- a/src/components/button/README.md +++ b/src/components/button/README.md @@ -144,14 +144,6 @@ Buttons are configured to perform an action and they can have a different look. "disabled": true }) }} -## Dependencies - -To consume the button component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/button - ## Requirements ### Build tool configuration @@ -166,7 +158,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -320,22 +312,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/button - -To update the latest version run: - - npm update @govuk-frontend/button - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/checkboxes/README.md b/src/components/checkboxes/README.md index c3d7c12d14..3ea96956c7 100644 --- a/src/components/checkboxes/README.md +++ b/src/components/checkboxes/README.md @@ -443,14 +443,6 @@ Find out when to use the Checkboxes component in your service in the [GOV.UK Des ] }) }} -## Dependencies - -To consume the checkboxes component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/checkboxes - ## Requirements ### Build tool configuration @@ -465,7 +457,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -655,22 +647,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/checkboxes - -To update the latest version run: - - npm update @govuk-frontend/checkboxes - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/date-input/README.md b/src/components/date-input/README.md index bd057797e6..b409573bf0 100644 --- a/src/components/date-input/README.md +++ b/src/components/date-input/README.md @@ -453,14 +453,6 @@ Find out when to use the Date input component in your service in the [GOV.UK Des ] }) }} -## Dependencies - -To consume the date-input component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/date-input - ## Requirements ### Build tool configuration @@ -475,7 +467,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -593,22 +585,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/date-input - -To update the latest version run: - - npm update @govuk-frontend/date-input - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/details/README.md b/src/components/details/README.md index 405db629d8..b90ae9eba1 100644 --- a/src/components/details/README.md +++ b/src/components/details/README.md @@ -98,14 +98,6 @@ Find out when to use the Details component in your service in the [GOV.UK Design "html": "Your National Insurance number can be found on\n

\n" }) }} -## Dependencies - -To consume the details component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/details - ## Requirements ### Build tool configuration @@ -120,7 +112,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -250,22 +242,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/details - -To update the latest version run: - - npm update @govuk-frontend/details - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/error-message/README.md b/src/components/error-message/README.md index 8b540ddf81..1bc689f990 100644 --- a/src/components/error-message/README.md +++ b/src/components/error-message/README.md @@ -28,14 +28,6 @@ Find out when to use the Error message component in your service in the [GOV.UK "text": "Error message about full name goes here" }) }} -## Dependencies - -To consume the error-message component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/error-message - ## Requirements ### Build tool configuration @@ -50,7 +42,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -132,22 +124,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/error-message - -To update the latest version run: - - npm update @govuk-frontend/error-message - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/error-summary/README.md b/src/components/error-summary/README.md index cabf3776c0..06f1cfe8d4 100644 --- a/src/components/error-summary/README.md +++ b/src/components/error-summary/README.md @@ -64,14 +64,6 @@ Find out when to use the Error summary component in your service in the [GOV.UK ] }) }} -## Dependencies - -To consume the error-summary component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/error-summary - ## Requirements ### Build tool configuration @@ -86,7 +78,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -204,22 +196,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/error-summary - -To update the latest version run: - - npm update @govuk-frontend/error-summary - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/fieldset/README.md b/src/components/fieldset/README.md index 64e5aa9f00..cde1dc4590 100644 --- a/src/components/fieldset/README.md +++ b/src/components/fieldset/README.md @@ -62,14 +62,6 @@ Find out when to use the Fieldset component in your service in the [GOV.UK Desig } }) }} -## Dependencies - -To consume the fieldset component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/fieldset - ## Requirements ### Build tool configuration @@ -84,7 +76,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -190,22 +182,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/fieldset - -To update the latest version run: - - npm update @govuk-frontend/fieldset - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/file-upload/README.md b/src/components/file-upload/README.md index efb271161b..4a0336e786 100644 --- a/src/components/file-upload/README.md +++ b/src/components/file-upload/README.md @@ -169,14 +169,6 @@ Find out when to use the File upload component in your service in the [GOV.UK De } }) }} -## Dependencies - -To consume the file-upload component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/file-upload - ## Requirements ### Build tool configuration @@ -191,7 +183,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -321,22 +313,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/file-upload - -To update the latest version run: - - npm update @govuk-frontend/file-upload - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/footer/README.md b/src/components/footer/README.md index 97ce5a00ce..e612c7e113 100644 --- a/src/components/footer/README.md +++ b/src/components/footer/README.md @@ -60,14 +60,6 @@ Find out when to use the Footer component in your service in the [GOV.UK Design {{ govukFooter({}) }} -## Dependencies - -To consume the footer component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/footer - ## Requirements ### Build tool configuration @@ -82,7 +74,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -224,22 +216,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/footer - -To update the latest version run: - - npm update @govuk-frontend/footer - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/hint/README.md b/src/components/hint/README.md index 1207dd8962..04205fa56f 100644 --- a/src/components/hint/README.md +++ b/src/components/hint/README.md @@ -42,14 +42,6 @@ Use hint text for supporting contextual help "html": "It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’." }) }} -## Dependencies - -To consume the hint component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/hint - ## Requirements ### Build tool configuration @@ -64,7 +56,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -158,22 +150,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/hint - -To update the latest version run: - - npm update @govuk-frontend/hint - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/input/README.md b/src/components/input/README.md index dabbca00b3..5b8b6939e2 100644 --- a/src/components/input/README.md +++ b/src/components/input/README.md @@ -241,14 +241,6 @@ Find out when to use the Input component in your service in the [GOV.UK Design S "name": "test-name" }) }} -## Dependencies - -To consume the input component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/input - ## Requirements ### Build tool configuration @@ -263,7 +255,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -405,22 +397,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/input - -To update the latest version run: - - npm update @govuk-frontend/input - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/label/README.md b/src/components/label/README.md index 1ee8e9c26a..2661e28c14 100644 --- a/src/components/label/README.md +++ b/src/components/label/README.md @@ -66,14 +66,6 @@ Use labels for all form fields. "isPageHeading": true }) }} -## Dependencies - -To consume the label component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/label - ## Requirements ### Build tool configuration @@ -88,7 +80,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -194,22 +186,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/label - -To update the latest version run: - - npm update @govuk-frontend/label - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/panel/README.md b/src/components/panel/README.md index f31e25a21a..99fbb6c17b 100644 --- a/src/components/panel/README.md +++ b/src/components/panel/README.md @@ -34,14 +34,6 @@ Find out when to use the Panel component in your service in the [GOV.UK Design S "text": "Your reference number: HDJ2123F" }) }} -## Dependencies - -To consume the panel component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/panel - ## Requirements ### Build tool configuration @@ -56,7 +48,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -162,22 +154,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/panel - -To update the latest version run: - - npm update @govuk-frontend/panel - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/phase-banner/README.md b/src/components/phase-banner/README.md index 8913f926c0..be01980312 100644 --- a/src/components/phase-banner/README.md +++ b/src/components/phase-banner/README.md @@ -37,14 +37,6 @@ Find out when to use the Phase banner component in your service in the [GOV.UK D "html": "This is a new service - your feedback will help us to improve it." }) }} -## Dependencies - -To consume the phase-banner component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/phase-banner - ## Requirements ### Build tool configuration @@ -59,7 +51,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -153,22 +145,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/phase-banner - -To update the latest version run: - - npm update @govuk-frontend/phase-banner - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/radios/README.md b/src/components/radios/README.md index 5b471a6699..b70db1cffd 100644 --- a/src/components/radios/README.md +++ b/src/components/radios/README.md @@ -415,14 +415,6 @@ Find out when to use the Radios component in your service in the [GOV.UK Design ] }) }} -## Dependencies - -To consume the radios component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/radios - ## Requirements ### Build tool configuration @@ -437,7 +429,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -627,22 +619,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/radios - -To update the latest version run: - - npm update @govuk-frontend/radios - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/select/README.md b/src/components/select/README.md index 00ad394951..8610b1dab2 100644 --- a/src/components/select/README.md +++ b/src/components/select/README.md @@ -176,14 +176,6 @@ Find out when to use the Select component in your service in the [GOV.UK Design ] }) }} -## Dependencies - -To consume the select component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/select - ## Requirements ### Build tool configuration @@ -198,7 +190,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -376,22 +368,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/select - -To update the latest version run: - - npm update @govuk-frontend/select - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/skip-link/README.md b/src/components/skip-link/README.md index 042ae0638c..a078033a79 100644 --- a/src/components/skip-link/README.md +++ b/src/components/skip-link/README.md @@ -27,14 +27,6 @@ Find out when to use the Skip link component in your service in the [GOV.UK Desi "href": "#content" }) }} -## Dependencies - -To consume the skip-link component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/skip-link - ## Requirements ### Build tool configuration @@ -49,7 +41,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -143,22 +135,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/skip-link - -To update the latest version run: - - npm update @govuk-frontend/skip-link - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/table/README.md b/src/components/table/README.md index 9480cf5017..91487b506e 100644 --- a/src/components/table/README.md +++ b/src/components/table/README.md @@ -338,14 +338,6 @@ Find out when to use the Table component in your service in the [GOV.UK Design S ] }) }} -## Dependencies - -To consume the table component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/table - ## Requirements ### Build tool configuration @@ -360,7 +352,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -538,22 +530,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/table - -To update the latest version run: - - npm update @govuk-frontend/table - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/tag/README.md b/src/components/tag/README.md index 59d427f88b..e641d5117a 100644 --- a/src/components/tag/README.md +++ b/src/components/tag/README.md @@ -47,14 +47,6 @@ Find out when to use the Tag component in your service in the [GOV.UK Design Sys "classes": "govuk-tag--inactive" }) }} -## Dependencies - -To consume the tag component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/tag - ## Requirements ### Build tool configuration @@ -69,7 +61,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -151,22 +143,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/tag - -To update the latest version run: - - npm update @govuk-frontend/tag - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/textarea/README.md b/src/components/textarea/README.md index 6bd871913a..6cc83048c7 100644 --- a/src/components/textarea/README.md +++ b/src/components/textarea/README.md @@ -163,14 +163,6 @@ Find out when to use the Textarea component in your service in the [GOV.UK Desig } }) }} -## Dependencies - -To consume the textarea component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/textarea - ## Requirements ### Build tool configuration @@ -185,7 +177,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -327,22 +319,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/textarea - -To update the latest version run: - - npm update @govuk-frontend/textarea - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") diff --git a/src/components/warning-text/README.md b/src/components/warning-text/README.md index 0eaf4ffd51..c84dde611d 100644 --- a/src/components/warning-text/README.md +++ b/src/components/warning-text/README.md @@ -33,14 +33,6 @@ Find out when to use the Warning text component in your service in the [GOV.UK D "iconFallbackText": "Warning" }) }} -## Dependencies - -To consume the warning-text component you must be running npm version 5 or above. - -## Installation - - npm install --save @govuk-frontend/warning-text - ## Requirements ### Build tool configuration @@ -55,7 +47,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) ## Component arguments @@ -149,22 +141,12 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend', { + nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { autoescape: true, cache: false, express: app }) -## Getting updates - -To check whether you have the latest version of the button run: - - npm outdated @govuk-frontend/warning-text - -To update the latest version run: - - npm update @govuk-frontend/warning-text - ## Contribution Guidelines can be found at [on our Github repository.](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md "link to contributing guidelines on our github repository") From 7e754512dd4d79156bc8bec36f4de3b3d698b766 Mon Sep 17 00:00:00 2001 From: Jani Kraner Date: Sun, 20 May 2018 19:01:01 +0100 Subject: [PATCH 3/3] Document in CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ab4b1297b..fbd6d2d874 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Note: We're not following semantic versioning yet, we are going to talk about this soon. +## Unreleased + +Fixes: + +- Update component readme files content + ([PR #704](https://github.com/alphagov/govuk-frontend/pull/704)) + + ## 0.0.29-alpha (Breaking release) Breaking changes: