Skip to content

Commit 63bb5c0

Browse files
authored
docs: Fix index, add build instructions, fix x-ray header warning (#99)
1 parent 932cea2 commit 63bb5c0

File tree

2 files changed

+55
-14
lines changed

2 files changed

+55
-14
lines changed

README.md

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ which will install the web client in your application.
1616
## Documentation
1717

1818
1. [Installing from CDN](docs/cdn_installation.md)
19-
2. [Executing Commands](docs/cdn_commands.md)
20-
3. [Using the Web Client with Angular](docs/cdn_angular.md)
21-
4. [Using the Web Client with React](docs/cdn_react.md)
22-
5. [Using the Web Client with React](docs/cdn_react.md)
23-
6. [Troubleshooting CDN Installations](docs/cdn_troubleshooting.md)
19+
1. [Executing Commands](docs/cdn_commands.md)
20+
1. [Using the Web Client with Angular](docs/cdn_angular.md)
21+
1. [Using the Web Client with React](docs/cdn_react.md)
22+
1. [Troubleshooting CDN Installations](docs/cdn_troubleshooting.md)
2423

2524
## Getting Help
2625

@@ -49,26 +48,64 @@ We support and accept PRs from the community.
4948

5049
See [CONTRIBUTING](./CONTRIBUTING.md)
5150

51+
## Build from Source
52+
53+
The CloudWatch RUM web client is developed and built using Node.js version 16 or higher.
54+
55+
To build the CloudWatch RUM web client, run the release process:
56+
57+
```
58+
npm install
59+
npm run release
60+
```
61+
62+
The release process creates (1) a web bundle and a debug map for distribution via CDN, and (2) JavaScript modules and TypeScript declaration files for distribution via NPM.
63+
64+
The CDN files are:
65+
66+
```
67+
./build/assets/cwr.js
68+
./build/assets/cwr.map.js
69+
```
70+
71+
The NPM files are:
72+
73+
```
74+
./dist/es/index.js
75+
./dist/es/index.d.ts
76+
./dist/cjs/index.js
77+
./dist/cjs/index.d.ts
78+
```
79+
5280
## Run Tests from Source
5381

5482
To perform exploratory testing, run the Webpack DevServer:
5583

56-
`npm run server`
84+
```
85+
npm install
86+
npm run server
87+
```
5788

5889
In a browser, navigate to http://localhost:9000.
5990

6091
To run (Jest) unit tests:
6192

62-
`npm run test`
93+
```
94+
npm run test
95+
```
6396

6497
To run (TestCafe) browser integration tests:
6598

66-
`npm run integ:local:chrome:headless`
99+
```
100+
npm run integ:local:chrome:headless
101+
```
67102

68103
Some features perform monkey patching which is incompatible with TestCafe. In
69104
these cases, run Nightwatch as a separate browser integration test target:
70105

71-
`npm run integ:local:nightwatch`
106+
```
107+
npm run integ:local:nightwatch
108+
```
72109

73110
## Pre-commit Tasks
74111

@@ -78,11 +115,15 @@ resolved.
78115

79116
Attempt to automatically repair linter warnings:
80117

81-
`npm run lint:fix`
118+
```
119+
npm run lint:fix
120+
```
82121

83122
Format code:
84123

85-
`npm run prettier:fix`
124+
```
125+
npm run prettier:fix
126+
```
86127

87128
## Security
88129

docs/cdn_troubleshooting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ configurations removed for readability.
167167

168168
> :warning: Enabling `addXRayTraceIdHeader` will cause a new header to be added
169169
to all HTTP requests. Adding headers can modify CORS behavior, including causing
170-
the request to fail. Adding headers after SigV4 signing will invalidate the
171-
request signature, causing the request to fail. Test your application with this
172-
header enabled before enabling this option in a production environment.
170+
the request to fail. Adding headers may also alter the request signature,
171+
causing the request to fail. Test your application with this header enabled
172+
before enabling this option in a production environment.
173173

174174
```html
175175
<script>

0 commit comments

Comments
 (0)