@raspberrypifoundation/design-system-react 1.1.15 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -19
- package/dist/cjs/bundle.js +222 -16
- package/dist/esm/bundle.js +218 -17
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,40 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Using `npm`:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @raspberrypifoundation/design-system-react
|
|
9
|
+
npm run storybook
|
|
10
|
+
```
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
Using `yarn`:
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
```bash
|
|
15
|
+
yarn install @raspberrypifoundation/design-system-react
|
|
16
|
+
yarn storybook
|
|
17
|
+
```
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
### Working with a local version of [design-system-core](https://github.com/RaspberryPiFoundation/design-system-core)
|
|
14
20
|
|
|
15
|
-
-
|
|
16
|
-
- created a file called `.npmrc` in your user root directory (not the directory of this project) that contains the following:
|
|
17
|
-
`//npm.pkg.github.com/:_authToken={GITHUB_TOKEN}`
|
|
21
|
+
Sometimes you may want to work on `design-system-core` and `design-system-react` at the same time. You can do this by working with your local version of core using `npm link`.
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
1. Navigate to your local `design-system-core` repo create a global symbolic link.
|
|
20
24
|
|
|
21
25
|
```
|
|
22
|
-
npm
|
|
23
|
-
|
|
24
|
-
npm run storybook
|
|
26
|
+
npm link
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
2. In `design-system-react` remove the node_modules folder and install the application.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
```
|
|
32
|
+
rm -rf node_modules && npm i
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
3. Navigate to your local `design-system-react` repo and tell the application to use the global symbolic link. You should notice "changed 1 package" in the response.
|
|
30
36
|
|
|
31
37
|
```
|
|
32
|
-
|
|
33
|
-
@raspberrypifoundation:registry=https://npm.pkg.github.com
|
|
38
|
+
npm link @raspberrypifoundation/design-system-core
|
|
34
39
|
```
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
#### Troubleshooting
|
|
42
|
+
|
|
43
|
+
If you are experiencing issues and believe design-system-react is not using your local version of design-system-core, or if you are running into issues running `npm link`, try the following:
|
|
44
|
+
|
|
45
|
+
- Check that `design-system-react` and `design-system-core` are both using the same `nodejs` version in `.tool_versions`. If they are not, update the node version(s) in `.tool_versions` locally and retry the steps above. If this was the issues / the `nodejs` versions are not the same, consider creating a PR to bring them in-line.
|
|
46
|
+
|
|
47
|
+
- Ensure that you are running the `npm link` command in step 3 AFTER step 2. Doing these in the wrong order will not work.
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
## Deployment
|
|
39
50
|
|
|
40
51
|
Create a new [release](https://github.com/RaspberryPiFoundation/design-system-react/releases):
|
|
41
52
|
|
|
@@ -46,6 +57,6 @@ Create a new [release](https://github.com/RaspberryPiFoundation/design-system-re
|
|
|
46
57
|
- Click 'Publish release' (leave 'Set as latest release' checked) and a build will be kicked off
|
|
47
58
|
- Add new version to `package.json` in your app
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
## Using Docker
|
|
50
61
|
|
|
51
62
|
TODO
|