Skip to content

Commit

Permalink
Merge pull request #704 from alphagov/update-component-readmes
Browse files Browse the repository at this point in the history
Update component README's
  • Loading branch information
alex-ju authored May 21, 2018
2 parents 3c683e8 + 7e75451 commit 44fa2ae
Show file tree
Hide file tree
Showing 25 changed files with 56 additions and 488 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 2 additions & 28 deletions app/views/layouts/readme.njk
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@
{{ showExamples(componentName, componentData) }}
{% endblock %}

<h2>Dependencies</h2>

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

<p>{% block componentDependencies %}{% endblock %}</p>

<h2>Installation</h2>

<pre><code>
npm install --save @govuk-frontend/{{ componentName }}
</code></pre>

<h2>Requirements</h2>
<h3>Build tool configuration</h3>
<p>When compiling the Sass files you'll need to define includePaths to reference the node_modules directory. Below is a sample configuration using gulp</p>
Expand All @@ -53,7 +41,7 @@ npm install --save @govuk-frontend/{{ componentName }}
your app to show these assets. Below is a sample configuration using Express js:</p>

<pre><code>
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')))
</code></pre>

<h2>Component arguments</h2>
Expand All @@ -67,27 +55,13 @@ app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-fro
<p>Below is an example setup using express configure views:</p>

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

<h2>Getting updates</h2>

<p>To check whether you have the latest version of the button run:</p>

<pre><code>
npm outdated @govuk-frontend/{{ componentName }}
</code></pre>

<p>To update the latest version run:</p>

<pre><code>
npm update @govuk-frontend/{{ componentName }}
</code></pre>

<h2>Contribution</h2>
<p>
Guidelines can be found at <a href="https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md" title="link to contributing guidelines on our github repository" class="govuk-link">on our Github repository.</a>
Expand Down
22 changes: 2 additions & 20 deletions src/components/back-link/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
22 changes: 2 additions & 20 deletions src/components/breadcrumbs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
22 changes: 2 additions & 20 deletions src/components/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
22 changes: 2 additions & 20 deletions src/components/checkboxes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
22 changes: 2 additions & 20 deletions src/components/date-input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
22 changes: 2 additions & 20 deletions src/components/details/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<ul>\n <li>your National Insurance card</li>\n <li>your payslip</li>\n <li>P60</li>\n <li>benefits information</li>\n <li>tax return</li>\n</ul>\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
Expand All @@ -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

Expand Down Expand Up @@ -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")
Expand Down
Loading

0 comments on commit 44fa2ae

Please sign in to comment.