You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* time series: handle irregular series, map based on timestamp
* 1.9.1
* handle sending credentials with CORS requests to support multiple domains
* remove cors withCredentials by default for arcgis asset API calls
* 1.10.0-rc.1.0
* utilize bundles from API, restructure
* clean up lib generation
* add bundle service, parser
* prepare v1.10.0-rc.2.0
* prepare v1.10.0
Copy file name to clipboardExpand all lines: README.md
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,19 +44,25 @@ And used like any other component in the containing render() method.
44
44
### Using Components Outside of a NEON Domain
45
45
46
46
Portal Core Components are designed to be used throughout the NEON web application platform as well
47
-
as on any third party platform. However, in order to work properly outside of NEON, two environment
48
-
variable must be set so that components that generate links do so properly.
47
+
as on any third party platform. However, in order to work properly outside of NEON, environment
48
+
variables must be set to reference the appropriate API endpoints.
49
49
50
-
**`REACT_APP_NEON_HOST_OVERRIDE`**
50
+
#### Development
51
51
52
-
Set this environment variable to your host without a trailing slash (e.g. "https://myhost.org").
52
+
**`REACT_APP_NEON_API_HOST_OVERRIDE`**
53
53
54
-
**`REACT_APP_FOREIGN_LOCATION`**
54
+
Set this environment variable to the desired API host without a trailing slash (e.g. "https://data.neonscience.org"). Note that this is a build time environment variable and if set within `.env.production` will impact *all* deployments.
55
55
56
-
Set this environment variable to `true`.
56
+
#### Production
57
57
58
-
The host envvar above is typically reserved for development purposes and will be ignored in
59
-
production *unless* the foreign location env var is true.
58
+
By default, the production build will use the appropriate production values for the API host. To customize based on runtime environment variables, will need to inject the following object into the DOM prior to the application's initialization (e.g. inject into the static HTML server side or equivalent):
59
+
60
+
```javascript
61
+
window.NEON_SERVER_DATA= {
62
+
NeonPublicAPIHost:'https://data.neonscience.org',
63
+
NeonWebHost:'https://www.neonscience.org',
64
+
};
65
+
```
60
66
61
67
#### Theming and Contexts Outside of a NEON Domain
62
68
@@ -92,14 +98,14 @@ wrapping them in additional resources unless the documentation specifically stat
92
98
* If the entry point is the _same pre- and post-compile_ then use only `main` to point to the common entry point
93
99
* Use kebab-case for `name`
94
100
* Use CamelCase for files
95
-
6. Add the new component to `src/lib_components/index.ts`
101
+
6. If desirable to export the component at the library level, add the new component to `src/lib_components/index.ts`
96
102
7. Run `npm run lib` to have the new component picked up and exported with the library
97
103
98
104
### NOTE: Verify new dependencies!
99
105
100
106
If you have added or modified third-party dependencies then it is important to verify they work from a fresh install before committing changes upstream.
101
107
102
-
Run `rm -rf node_modules && npm install` and re-run the app to validate a fresh install. This mimics how other apps importing `portal-core-components` will see your changes.
108
+
Run `rm -rf node_modules && npm ci` and re-run the app to validate a fresh install. This mimics how other apps importing `portal-core-components` will see your changes.
103
109
104
110
### Using Workers in Components
105
111
@@ -158,7 +164,7 @@ Have nodejs.
158
164
159
165
Clone this project from git. In the cloned directory, run:
160
166
161
-
npm install
167
+
npm ci
162
168
163
169
This should pick up everything from the package-lock.json file via the npm repos.
0 commit comments