Skip to content

Commit c3d72be

Browse files
committed
chore: Adjust the docs to reflect moving widgets to their repos
1 parent 1098e81 commit c3d72be

File tree

4 files changed

+54
-30
lines changed

4 files changed

+54
-30
lines changed
-7.36 KB
Loading

src/content/docs/getting-started/customize.mdx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Let's customize your new 1FE app by making changes to the default plugin! Since
1212

1313
## <SlPencil style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Make changes to example plugin
1414

15-
##### 1. Make any content change to `widgets/app1/src`
15+
##### 1. Make any content change to `1fe-widget-starter-kit/src`
1616

17-
```tsx title="widgets/app1/src/app1.tsx" {10}
17+
```tsx title="1fe-widget-starter-kit/src/app1.tsx" {10}
1818
import { platformProps } from '@devhub/1fe-shell';
1919
import React, { useEffect } from 'react';
2020
import { Router as Widget } from './components/router';
@@ -34,24 +34,25 @@ export default withProvider(RootWrapper);
3434

3535
```
3636

37-
##### 2. Build the plugin within `widgets/app1` directory
37+
##### 2. Build the plugin within `1fe-widget-starter-kit` directory
3838

3939
:::caution
40-
**Keep your 1FE app running in the background**.
40+
**Keep your 1FE app running in the background**.
4141

4242
1FE CLI will need the development server for the build process. This will later be pointed to a deployed environment once your 1FE app is hosted.
4343
:::
4444

4545
```bash
46-
# dev-hub
47-
cd widgets/app1 && yarn build:widget
46+
# 1fe
47+
cd 1fe-widget-starter-kit
48+
yarn build:widget
4849
```
4950

5051
:::tip
5152
1FE CLI will build the widget. Observe the assets within the `dist` folder.
5253
:::
5354

54-
![A rocketship in space](./assets/example-plugin-dist.png)
55+
![dist folder contents](./assets/example-plugin-dist.png)
5556

5657

5758
## <SlCloudDownload style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> "Deploy" your plugin to a CDN
@@ -63,19 +64,22 @@ To get started quickly, we can use github's mirrored assets on the jsdelivr CDN.
6364
##### 2. Upload the new assets to your forked mocked-cdn-assets repository
6465
1. Create a new directory within `development/widgets/@1fe/starter-kit` of your forked repo. The directory name should be the next bumped version. (e.g `1.0.2`).
6566

66-
2. Upload the contents of the `dist` folder from your local `widgets/app1` directory to the new directory.
67+
2. Upload the contents of the `1fe-widget-starter-kit/dist/` directory to the new directory.
6768

68-
![A rocketship in space](./assets/example-plugin-cdn-assets.png)
69+
![dist folder assets copied to CDN](./assets/example-plugin-cdn-assets.png)
6970

7071
3. Push these changes to your forked repository.
7172

72-
4. Confirm that the assets are publicly accessible by visiting this jsdelivr cdn location. Replace with your gh username and version: `https://cdn.jsdelivr.net/gh/<your-github-username>/mock-cdn-assets/development/widgets/@1fe/starter-kit/<version>/js/1fe-bundle.js`.
73+
4. Confirm that the assets are publicly accessible by visiting this jsdelivr cdn location. Replace with your gh username and version:
74+
```
75+
https://cdn.jsdelivr.net/gh/<your-github-username>/mock-cdn-assets/development/widgets/@1fe/starter-kit/<version>/js/1fe-bundle.js
76+
```
7377

7478
##### 3. Update the Live Configurations to find your new plugin assets
7579

7680
1. Locate `common-configs/development.json` within your forked mock-cdn-assets repository.
7781

78-
2. Under `cdn.libraries.basePrefix` and `cdn.widgets.basePrefix`, update the base prefix to point to your jsdelivr cdn.
82+
2. Under `cdn.libraries.basePrefix` and `cdn.widgets.basePrefix`, update the base prefix to point to your jsdelivr cdn.
7983

8084
```json title="common-configs/development.json" {4,8}
8185
{
@@ -92,7 +96,7 @@ To get started quickly, we can use github's mirrored assets on the jsdelivr CDN.
9296
}
9397
```
9498

95-
3. Under `cdn.widgets.releaseConfig`, locate the widgetId `@1fe/starter-kit` and update with the new version.
99+
3. Under `cdn.widgets.releaseConfig`, locate the widgetId `@1fe/starter-kit` and update with the new version.
96100

97101
```json title="common-configs/development.json" {8}
98102
...
@@ -137,14 +141,13 @@ const options = {
137141
const app = oneFEServer(options);
138142
```
139143

140-
##### <FcOk style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Tada!
144+
##### <FcOk style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Tada!
141145

142146
![A rocketship in space](./assets/example-plugin-change.png)
143147

144148
:::note
145-
**In an ideal-state:**
149+
**In an ideal-state:**
146150
- There should be proper CDN hosting for Live Configurations and widget assets.
147151
- Each widget should live in their own repository.
148152
- Each widget should own CI/CD pipelines that upload assets to CDN and bump release versions on merge. (Templates Coming Soon! <SlRocket style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> )
149153
:::
150-

src/content/docs/getting-started/installation.mdx

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,50 @@ import { SlWrench, SlAnchor, SlCloudDownload } from "react-icons/sl";
1717

1818
## <SlCloudDownload style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Manual Installation
1919

20-
##### 1. Clone or fork the 1FE monorepo:
20+
##### 1. Clone the 1FE monorepo (or your fork of it):
2121

2222
```bash
23-
git clone https://github.com/docusign/dev-hub.git
23+
git clone https://github.com/docusign/1fe.git
2424
```
2525

26-
##### 2. Install and Build dependencies at the root:
26+
##### 2. Clone the 1FE widget starter kit (WSK):
27+
2728
```bash
28-
cd dev-hub && yarn && yarn build
29+
git clone https://github.com/docusign/1fe-widget-starter-kit.git
2930
```
3031

31-
##### 3. Run the starter app development server
32+
##### 2. Set up both the repos:
33+
34+
First you need to build the 1FE monorepo and the starter kit.
3235

3336
```bash
34-
cd apps/starter-app && yarn dev
37+
cd 1fe # adjust this to fit your directory structure
38+
yarn && yarn build
3539
```
36-
37-
Visit `http://localhost:3001/app1` to view your application.
3840

39-
## <SlWrench style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Automatic Installation (WIP)
41+
Then, you need to set up the starter kit.
4042

41-
Coming Soon!
43+
```bash
44+
cd 1fe-widget-starter-kit # adjust this to fit your directory structure
45+
yarn
46+
```
47+
48+
##### 3. Run the starter app development server
49+
50+
```bash
51+
cd 1fe/apps/starter-app # adjust this to fit your directory structure
52+
yarn dev
53+
```
4254

55+
##### 4. Run the development server for the WSK
4356

57+
```bash
58+
cd 1fe-widget-starter-kit/ # adjust this to fit your directory structure
59+
yarn dev
60+
```
4461

62+
Now visit `http://localhost:3001/app1` to view your application! 🎉
4563

64+
## <SlWrench style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Automatic Installation (WIP)
4665

66+
Coming Soon!

src/content/docs/getting-started/local-development.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@ import { FcOk } from "react-icons/fc";
1010

1111
## <SlWrench style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Need to develop locally?
1212

13-
##### 1. Run `yarn dev` in `widgets/app1`
13+
##### 1. Run `yarn dev` in `1fe-widget-starter-kit/`
1414

1515
```bash
16-
cd widgets/app1 && yarn dev
16+
cd 1fe-widget-starter-kit
17+
yarn dev
1718
```
1819

1920
1FE CLI will serve the widget bundle at `http://localhost:8080/js/1fe-bundle.js`
2021

21-
##### 2. Visit `http://localhost:3001/app1` and click the `{...}` button at the bottom right corner of the screen. ![A rocketship in space](./assets/three-dots.png)
22+
##### 2. Visit `http://localhost:3001/app1` and click the `{...}` button at the bottom right corner of the screen. ![Import map overrides button showing three dots in brackets](./assets/three-dots.png)
2223

2324
##### 3. Search for `@1fe/starter-kit` within the shelf and select the matching module
2425

25-
![A rocketship in space](./assets/import-map-shelf.png)
26+
![Import map shelf](./assets/import-map-shelf.png)
2627

2728
##### 4. In the `Override URL` field, enter `http://localhost:8080/js/1fe-bundle.js` and click `Apply override`.
2829

29-
![A rocketship in space](./assets/override-modal.png)
30+
![Import map override modal](./assets/override-modal.png)
3031

3132
##### 5. <FcOk style={{ display: 'inline', marginRight: '0.5rem', verticalAlign: 'middle' }} /> Make changes toy our widget and observe the changes in the browser.

0 commit comments

Comments
 (0)