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

Commit 9acbc97

Browse files
authored
Merge pull request #26 from topcoder-platform/challenge-listing-part-1
Challenge listing part 1
2 parents 46a3bd5 + 19cd6d5 commit 9acbc97

File tree

215 files changed

+19156
-1956
lines changed

Some content is hidden

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

215 files changed

+19156
-1956
lines changed

.circleci/config.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,16 @@ builddeploy_steps: &builddeploy_steps
2929
- run: *install_dependency
3030
- run: *install_deploysuite
3131
- restore_cache: *restore_cache_settings_for_build
32-
- run: ./build.sh ${APPNAME}
33-
- save_cache: *save_cache_settings
32+
- run:
33+
command: |
34+
./awsconfiguration.sh $DEPLOY_ENV
35+
source awsenvconf
36+
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
37+
- run:
38+
command: |
39+
source buildenvvar
40+
./build.sh ${APPNAME}
41+
#- save_cache: *save_cache_settings
3442
- deploy:
3543
name: Running MasterScript.
3644
command: |
@@ -69,11 +77,12 @@ workflows:
6977
branches:
7078
only:
7179
- dev
80+
- challenge-listing-part-1
7281

7382
# Production builds are exectuted only on tagged commits to the
7483
# master branch.
7584
- "build-prod":
7685
context: org-global
7786
filters:
7887
branches:
79-
only: master
88+
only: ci-cd-prod

babel.config.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
let cssLocalIdent;
2+
if (process.env.APPMODE == 'development') {
3+
cssLocalIdent = 'earn_[path][name]___[local]___[hash:base64:6]';
4+
} else {
5+
cssLocalIdent = '[hash:base64:6]';
6+
}
7+
8+
const config = {
9+
presets: [
10+
['@babel/preset-env', { targets: { 'browsers': ['> 1%', 'not dead'] } }],
11+
'@babel/preset-react'
12+
],
13+
plugins: [
14+
['module-resolver', {
15+
extensions: ['.js', '.jsx'],
16+
root: [
17+
'./src',
18+
],
19+
}],
20+
[
21+
'inline-react-svg',
22+
{
23+
ignorePattern: '[/\/]assets[/\/]images'
24+
}
25+
],
26+
[
27+
"@babel/plugin-transform-runtime",
28+
{
29+
useESModules: true,
30+
regenerator: false,
31+
},
32+
],
33+
['react-css-modules', {
34+
filetypes: {
35+
'.scss': {
36+
syntax: 'postcss-scss',
37+
},
38+
},
39+
generateScopedName: cssLocalIdent
40+
}],
41+
]
42+
};
43+
44+
module.exports = config;

babel.config.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ set -eo pipefail
33
APP_NAME=$1
44
UPDATE_CACHE=""
55

6-
docker build -f docker/Dockerfile -t $APP_NAME:latest .
6+
docker build -f docker/Dockerfile -t $APP_NAME:latest \
7+
--build-arg APPMODE=$APPMODE \
8+
--build-arg APPENV=$APPENV .
79

810
docker create --name app $APP_NAME:latest
911

config/default.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
GUIKIT: {
3+
DEBOUNCE_ON_CHANGE_TIME: 150,
4+
},
5+
API: {
6+
V5: 'https://api.topcoder-dev.com/v5',
7+
V3: 'https://api.topcoder-dev.com/v3',
8+
},
9+
URL: {
10+
COMMUNITY_APP: 'https://community-app.topcoder-dev.com',
11+
}
12+
}

config/development.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
GUIKIT: {
3+
DEBOUNCE_ON_CHANGE_TIME: 150,
4+
},
5+
API: {
6+
V5: "https://api.topcoder-dev.com/v5",
7+
V3: "https://api.topcoder-dev.com/v3",
8+
},
9+
URL: {
10+
COMMUNITY_APP: "https://community-app.topcoder-dev.com",
11+
},
12+
};

config/production.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
GUIKIT: {
3+
DEBOUNCE_ON_CHANGE_TIME: 150,
4+
},
5+
API: {
6+
V5: "https://api.topcoder.com/v5",
7+
V3: "https://api.topcoder.com/v3",
8+
},
9+
URL: {
10+
COMMUNITY_APP: "https://community-app.topcoder.com",
11+
},
12+
};

config/test.js

Whitespace-only changes.

docker/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Use the base image with Node.js
22
FROM node:latest
33

4+
ARG APPMODE
5+
ARG APPENV
6+
7+
ENV APPMODE=$APPMODE
8+
ENV APPENV=$APPENV
9+
410
# Copy the current directory into the Docker image
511
COPY . /micro-frontends-earn-app
612

0 commit comments

Comments
 (0)