Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 260fc4d

Browse files
authored
docs: update npm installation (#211)
1 parent 85309f6 commit 260fc4d

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

storybook/dist/@ogcio/ogcio-ds.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

storybook/stories/get-started/install-with-npm.mdx

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Canvas, Meta } from '@storybook/blocks';
22
import { Link } from '../components/Link.jsx';
33

4-
<Meta title="Docs/Install with npm" />
4+
<Meta title="Docs/Install and update with npm" />
55

6-
<h1>Install with Node.js package manager (npm)</h1>
7-
<h2>Requirements</h2>
6+
## Install with Node.js package manager (npm)
7+
8+
### Requirements
89

910
1. [Install Node.js](https://nodejs.org/en/)
1011
2. `cd` to the root of your project and check if you have a `package.json` file. If you do not have the file, create it by running:
@@ -22,3 +23,39 @@ npm install @ogcio/ogcio-ds --save
2223
When the installation finishes, the `@ogcio/ogcio-ds` package will be in your `node_modules` folder.
2324

2425
You should now get started by <Link href='?path=/docs/docs-get-started--docs'>getting the CSS, assets and JavaScript working</Link> with one gov.ie Frontend component.
26+
27+
## Update using Node.js package manager (npm)
28+
29+
You can update with Node.js package manager (npm) if you originally installed OGCIO-DS with npm (mentioned above).
30+
31+
### Find out which version you're using
32+
33+
To find out which version of OGCIO-DS your project is using, you can run:
34+
35+
```
36+
npm list @ogcio/ogcio-ds
37+
```
38+
39+
If you do not have command line access, you can see the version number in the `package.json` file in the root of your project directory. For example:
40+
41+
```json
42+
"@ogcio/ogcio-ds": "0.0.8"
43+
```
44+
45+
## Update OGCIO-DS using npm
46+
47+
To find out the latest version of OGCIO-DS, check the [release notes](https://github.com/ogcio/ogcio-ds/releases) in the OGCIO-DS GitHub repository.
48+
49+
You may need to make code changes to keep OGCIO-DS working in your project, if the major version number changes when you update. The major version number is the first digit in the version number.
50+
51+
To update to the most recent version, run:
52+
53+
```
54+
npm install @ogcio/ogcio-ds@latest
55+
```
56+
57+
If you want to install an earlier version, replace `latest` with the version that you want to update to. For example:
58+
59+
```
60+
npm install @ogcio/[email protected]
61+
```

0 commit comments

Comments
 (0)