Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit eb793c7

Browse files
PROD-1551 #comment merge dev and remove all
references to the self service app and typescript #time 15m
2 parents f95082c + 47aeb5c commit eb793c7

Some content is hidden

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

48 files changed

+39
-1594
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install_dependency: &install_dependency
1111
install_deploysuite: &install_deploysuite
1212
name: Installation of install_deploysuite.
1313
command: |
14-
git clone --branch v1.4.2 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
14+
git clone --branch v1.4.8 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1515
cp ./../buildscript/master_deploy.sh .
1616
cp ./../buildscript/buildenv.sh .
1717
cp ./../buildscript/awsconfiguration.sh .
@@ -52,15 +52,15 @@ jobs:
5252
environment:
5353
DEPLOY_ENV: "DEV"
5454
LOGICAL_ENV: "dev"
55-
APPNAME: "micro-frontends-navbar-app"
55+
APPNAME: "mfe-header"
5656
steps: *builddeploy_steps
5757

5858
"build-prod":
5959
<<: *defaults
6060
environment:
6161
DEPLOY_ENV: "PROD"
6262
LOGICAL_ENV: "prod"
63-
APPNAME: "micro-frontends-navbar-app"
63+
APPNAME: "mfe-header"
6464
steps: *builddeploy_steps
6565

6666
workflows:

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Inside the project folder run:
3535

3636
- `npm i` - install dependencies
3737
- `npm run dev` - run app in development mode
38-
- As this app can be loaded only inside a frame single-spa, you have to run a `micro-frontends-frame` frame app and configure it to use the URL `http://localhost:8080/topcoder-micro-frontends-navbar-app.js`.
38+
- As this app can be loaded only inside a frame single-spa, you have to run a `mfe-core` frame app and configure it to use the URL `http://localhost:8080/topcoder-mfe-header.js`.
3939

4040
## Deployment to Production
4141

@@ -53,7 +53,7 @@ Make sure you have [Heroky CLI](https://devcenter.heroku.com/articles/heroku-cli
5353
- `git commit -m'inital commit'`
5454
- `heroku apps:create` - create Heroku app
5555
- `git push heroku master` - push changes to Heroku and trigger deploying
56-
- Now you have to configure frame app to use the URL provided by Heroku like `https://<APP-NAME>.herokuapp.com/topcoder-micro-frontends-navbar-app.js` to load this microapp.
56+
- Now you have to configure frame app to use the URL provided by Heroku like `https://<APP-NAME>.herokuapp.com/topcoder-mfe-header.js` to load this microapp.
5757
- NOTE: Authorization would not work because only predefined list of domain allowed by `accounts-app`.
5858

5959
### Cross microfrontend imports
@@ -73,7 +73,7 @@ This app exports functions to be imported by other microapps.
7373

7474
#### How to export
7575

76-
- To export any function we have to `export` in file [src/topcoder-micro-frontends-navbar-app.js](src/topcoder-micro-frontends-navbar-app.js).
76+
- To export any function we have to `export` in file [src/topcoder-mfe-header.js](src/topcoder-mfe-header.js).
7777
- If we want to prepare some function for exporting, the good place to do so is inside [src/utils/exports.js](src/utils/exports.js).
7878
- We have to bind actions before exporting.
7979
- It's not recommended to export the whole Redux Store to keep only navbar responsible for updating it. It's better to create promises which would return some particular value from the store.
@@ -86,15 +86,15 @@ When we want to use methods exported in the navbar microapp in other apps we hav
8686

8787
For example see https://github.com/topcoder-platform/micro-frontends-react-app
8888

89-
1. Add `@topcoder/micro-frontends-navbar-app` to `externals` in webpack config:
89+
1. Add `@topcoder/mfe-header` to `externals` in webpack config:
9090

9191
```js
9292
externals: {
93-
"@topcoder/micro-frontends-navbar-app": "@topcoder/micro-frontends-navbar-app",
93+
"@topcoder/mfe-header": "@topcoder/mfe-header",
9494
},
9595
```
9696

97-
2. As `importmaps` only work in browser and don't work in unit test, we have to mock this module in unit tests. For example by creating a file `src/__mocks__/@topcoder/micro-frontends-navbar-app.js` with the content like:
97+
2. As `importmaps` only work in browser and don't work in unit test, we have to mock this module in unit tests. For example by creating a file `src/__mocks__/@topcoder/mfe-header.js` with the content like:
9898
```js
9999
module.exports = {
100100
login: () => {},
@@ -112,18 +112,18 @@ For example see https://github.com/topcoder-platform/micro-frontends-react-app
112112

113113
For example see https://github.com/topcoder-platform/micro-frontends-angular-app
114114

115-
1. Add `@topcoder/micro-frontends-navbar-app` to `externals` in webpack config:
115+
1. Add `@topcoder/mfe-header` to `externals` in webpack config:
116116

117117
```js
118118
externals: {
119-
"@topcoder/micro-frontends-navbar-app": "@topcoder/micro-frontends-navbar-app",
119+
"@topcoder/mfe-header": "@topcoder/mfe-header",
120120
},
121121
```
122122

123123
2. Add type definition in `src/typings.d.ts`:
124124

125125
```js
126-
declare module '@topcoder/micro-frontends-navbar-app' {
126+
declare module '@topcoder/mfe-header' {
127127
export const login: any;
128128
export const businessLogin: any;
129129
export const logout: any;
@@ -135,4 +135,4 @@ For example see https://github.com/topcoder-platform/micro-frontends-angular-app
135135
}
136136
```
137137

138-
3. TODO: How to make e2e tests work for Angular? So far they fail with error `Module not found: Error: Can't resolve '@topcoder/micro-frontends-navbar-app'`
138+
3. TODO: How to make e2e tests work for Angular? So far they fail with error `Module not found: Error: Can't resolve '@topcoder/mfe-header'`

docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ ENV APPMODE=$APPMODE
88
ENV APPENV=$APPENV
99

1010
# Copy the current directory into the Docker image
11-
COPY . /micro-frontends-navbar-app
11+
COPY . /mfe-header
1212

1313
# Set working directory for future use
14-
WORKDIR /micro-frontends-navbar-app
14+
WORKDIR /mfe-header
1515

1616
# Install the dependencies from package.json
1717
RUN npm install

docker/docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3"
22
services:
3-
micro-frontends-navbar-app:
4-
image: micro-frontends-navbar-app:latest
3+
mfe-header:
4+
image: mfe-header:latest
55
build:
66
context: ../
77
dockerfile: docker/Dockerfile

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@topcoder/micro-frontends-navbar-app",
2+
"name": "@topcoder/mfe-header",
33
"scripts": {
44
"start": "node server.js",
55
"dev": "cross-env APPMODE=development webpack-dev-server",
@@ -59,7 +59,6 @@
5959
"webpack-merge": "^4.2.2"
6060
},
6161
"dependencies": {
62-
"@heroicons/react": "^1.0.6",
6362
"@reach/router": "^1.3.4",
6463
"axios": "^0.21.1",
6564
"browser-cookies": "^1.2.0",

src-ts/declarations.d.ts

-11
This file was deleted.

src-ts/lib/avatar/Avatar.module.scss

-66
This file was deleted.

src-ts/lib/avatar/Avatar.tsx

-44
This file was deleted.

src-ts/lib/avatar/index.ts

-1
This file was deleted.

0 commit comments

Comments
 (0)