Skip to content

Commit eeb3882

Browse files
committed
UOF-61 - codebase refactor for better support for multiple apps
1 parent 6038344 commit eeb3882

File tree

2,632 files changed

+52593
-54915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,632 files changed

+52593
-54915
lines changed

.babelrc.js

-33
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Related JIRA Ticket:
2+
https://topcoder.atlassian.net/browse/<!-- JIRA TICKET ID -->
3+
4+
# What's in this PR?
5+
<!-- Please add a brief description of what this PR accomplishes -->
6+
7+
<!-- SEE [Pull Requests](../README.md#pull-requests) for more details about opening a PR -->

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ You will need to add the following line to your hosts file. The hosts file is no
143143

144144
>**NOTE**: The site must run on port 443 in order for auth0 to work and for the site to load properly. Mac users will need to run the app with elevated permissions.
145145
146+
Run following command to allow node to run apps on ports lowert than 500:
147+
148+
```
149+
sudo setcap 'cap_net_bind_service=+ep' `which node`
150+
```
151+
146152
### Local SSL
147153

148154
SSL is required for authentication to work properly.
@@ -165,7 +171,7 @@ Otherwise, you will need to override the exception each time you load the site.
165171

166172
### Personal Config
167173

168-
1. Add [hostname] to [`/src-ts/config/environments/app-host-environment.type.ts`](/src-ts/config/environments/app-host-environment.type.ts)
174+
1. Add [hostname] to [`/src/config/environments/app-host-environment.type.ts`](/src-ts/config/environments/app-host-environment.type.ts)
169175
2. Copy an existing config from [`/src-ts/config/environments/environment.*.config.ts`](/src-ts/config/environments/environment.brooke.config.ts)
170176
3. Rename new config `environment.[hostname].config.ts`
171177
4. Rename config variable to `EnvironmentConfig[HostName]`
@@ -174,7 +180,7 @@ Otherwise, you will need to override the exception each time you load the site.
174180
7. Prior to starting the server, set your host name:
175181
```% export REACT_APP_HOST_ENV=[hostname]```
176182

177-
>**NOTE:** Individual tools (e.g. [Learn tool](/src-ts/tools/learn/README.md)) can have their own configuration, which can be configured the same way as the global config.
183+
>**NOTE:** Individual tools (e.g. [Learn tool](/src/apps/learn/README.md)) can have their own configuration, which can be configured the same way as the global config.
178184
179185
#### For further convenience
180186

config-overrides.js

-74
This file was deleted.

config/dev.js

-105
This file was deleted.

config/index.js

-15
This file was deleted.

config/local.js

-3
This file was deleted.

config/prod.js

-41
This file was deleted.

craco.config.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const path = require('path');
2+
const CracoCSSModules = require('craco-css-modules');
3+
4+
const isProd = process.env.APPMODE === "production";
5+
6+
const localIdentName = isProd
7+
? "[hash:base64:6]"
8+
: "[name]_[local]__[hash:base64:6]";
9+
10+
const resolve = dir => path.resolve(__dirname, dir);
11+
12+
module.exports = {
13+
style: {
14+
modules: {
15+
localIdentName,
16+
},
17+
},
18+
19+
plugins: [
20+
{ plugin: CracoCSSModules },
21+
],
22+
23+
webpack: {
24+
alias: {
25+
// aliases used in JS/TS
26+
'~': resolve('src'),
27+
28+
// aliases used in SCSS files
29+
'@earn': resolve('src/apps/earn/src'),
30+
'@libs/ui/styles': resolve('src/libs/ui/lib/styles'),
31+
},
32+
}
33+
}

0 commit comments

Comments
 (0)