@cfpb/ccdb5-ui 2.9.1 → 2.9.3

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 CHANGED
@@ -54,23 +54,21 @@ Please see the subsection Configuring in [INSTALL](INSTALL.md#configuring)
54
54
  This application depends on the [Public Complaints API](https://github.com/cfpb/ccdb5-api)
55
55
  to be available.
56
56
 
57
- For local development, you will need to the following:
57
+ To run the app locally using the public consumerfinance.gov API, install dependencies and start the app in development mode:
58
58
 
59
- - [Run consumerfinance.gov locally (which includes the API)](https://github.com/cfpb/consumerfinance.gov#quickstart).
60
- - [Fill the local Elasticsearch with data](https://github.com/cfpb/ccdb-data-pipeline/blob/main/INSTALL.md).
61
-
62
- **_Note:_** The Public Complaints API runs as part of consumerfinance.gov, but you can run the API as an independent app:
59
+ ```
60
+ yarn
61
+ yarn start
62
+ ```
63
63
 
64
- - Ensure the consumerfinance.gov python container is stopped with `docker-compose stop python`.
65
- - [Install the API](https://github.com/cfpb/ccdb5-api#setup--running) and run it with `python manage.py runserver`.
66
- - Edit [`env.js`](https://github.com/cfpb/ccdb5-ui/blob/main/config/env.js#L104) to point `ccdbApiUrl.dev` to the locally running API (likely at `http://localhost:8000/`).
64
+ If you want to run the app against a local version of the API, edit the [`proxy`](https://github.com/cfpb/ccdb5-ui/blob/main/package.json#L134) property to point to your local API server, likely http://localhost:8000. See the [API docs](https://github.com/cfpb/ccdb5-api#setup--running) to learn how to setup and run the API.
67
65
 
68
66
  ###### Code-Build cycle
69
67
 
70
- To run the app in development mode:
68
+ Run the app in development mode:
71
69
 
72
70
  ```bash
73
- yarn run start
71
+ yarn start
74
72
  ```
75
73
 
76
74
  Open http://localhost:3000 to view it in the browser.
@@ -87,7 +85,7 @@ Enter `Control-C` to exit development mode
87
85
  To launch the JavaScript test runner in interactive watch/test mode:
88
86
 
89
87
  ```bash
90
- yarn run test
88
+ yarn test
91
89
  ```
92
90
 
93
91
  Enter `Control-C` to exit interactive watch mode
@@ -114,19 +112,19 @@ You can run the tests in headless mode and just see results, or you can open the
114
112
  To run local tests and just see results:
115
113
 
116
114
  ```bash
117
- yarn run cypress run --browser chrome --headless
115
+ yarn cypress run --browser chrome --headless
118
116
  ```
119
117
 
120
- This will run Cypress against a local version of consumerfinance.gov running on port 8000. To use a different port, such as the port 3000 used by `yarn run start`, pass a `--baseUrl` parameter:
118
+ This will run Cypress against a local version of consumerfinance.gov running on port 8000. To use a different port, such as the port 3000 used by `yarn start`, pass a `--baseUrl` parameter:
121
119
 
122
120
  ```bash
123
- yarn run cypress run --browser chrome --headless --config baseUrl=http://localhost:3000/data-research/consumer-complaints/search/
121
+ yarn cypress run --browser chrome --headless --config baseUrl=http://localhost:3000/data-research/consumer-complaints/search/
124
122
  ```
125
123
 
126
124
  To open a local Cypress test-runner to choose which tests to run and see the browser interactions:
127
125
 
128
126
  ```bash
129
- yarn run cypress open --browser chrome
127
+ yarn cypress open --browser chrome
130
128
  ```
131
129
 
132
130
  ### To run against a server
@@ -138,7 +136,7 @@ the tests will probably run into API throttling, which will make tests fail.
138
136
  Our internal DEV servers can be deployed with `DEBUG=True` for running Cypress tests.
139
137
 
140
138
  ```bash
141
- yarn run cypress run --browser chrome --headless --config baseUrl=https://[DEV SERVER URL]/data-research/consumer-complaints/search/
139
+ yarn cypress run --browser chrome --headless --config baseUrl=https://[DEV SERVER URL]/data-research/consumer-complaints/search/
142
140
  ```
143
141
 
144
142
  ## Release management
@@ -160,11 +158,11 @@ Ready to publish changes to npm?
160
158
  ### Steps:
161
159
 
162
160
  1. Ensure you're on `main` and `git pull` to confirm you're up-to-date.
163
- 2. Run `yarn run build` to ensure you have the latest built artifacts for npm.
161
+ 2. Run `yarn build` to ensure you have the latest built artifacts for npm.
164
162
  Commit any changes to `/dist/` directory files to `main`.
165
163
  3. Source your `.env` with `source ./.env` (if `GITHUB_TOKEN` in unset).
166
164
  4. Log into npm with `npm login` (if not already logged in).
167
- 5. Run `yarn run release` to start the release.
165
+ 5. Run `yarn release` to start the release.
168
166
  This'll run the build scripts to copy the latest JS into
169
167
  the `dist` directory. It then uses
170
168
  [release-it](https://github.com/release-it/release-it/) to publish to
@@ -189,7 +187,7 @@ Ready to publish changes to npm?
189
187
  ### Troubleshooting
190
188
 
191
189
  - Ensure your npm version is up-to-date.
192
- - `yarn run release` can't find https://www.npmjs.com/package/@cfpb/ccdb5-ui
190
+ - `yarn release` can't find https://www.npmjs.com/package/@cfpb/ccdb5-ui
193
191
  and doesn't succeed.
194
192
  - You're probably not an npm maintainer on the ccdb5-ui project.
195
193
  Reach out to a core consumerfinance.gov member to get access.