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

Challenge listing part 1 #26

Merged
merged 17 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ builddeploy_steps: &builddeploy_steps
- run: *install_dependency
- run: *install_deploysuite
- restore_cache: *restore_cache_settings_for_build
- run: ./build.sh ${APPNAME}
- save_cache: *save_cache_settings
- run:
command: |
./awsconfiguration.sh $DEPLOY_ENV
source awsenvconf
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
- run:
command: |
source buildenvvar
./build.sh ${APPNAME}
#- save_cache: *save_cache_settings
- deploy:
name: Running MasterScript.
command: |
Expand Down Expand Up @@ -69,11 +77,12 @@ workflows:
branches:
only:
- dev
- challenge-listing-part-1

# Production builds are exectuted only on tagged commits to the
# master branch.
- "build-prod":
context: org-global
filters:
branches:
only: master
only: ci-cd-prod
44 changes: 44 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
let cssLocalIdent;
if (process.env.APPMODE == 'development') {
cssLocalIdent = 'earn_[path][name]___[local]___[hash:base64:6]';
} else {
cssLocalIdent = '[hash:base64:6]';
}

const config = {
presets: [
['@babel/preset-env', { targets: { 'browsers': ['> 1%', 'not dead'] } }],
'@babel/preset-react'
],
plugins: [
['module-resolver', {
extensions: ['.js', '.jsx'],
root: [
'./src',
],
}],
[
'inline-react-svg',
{
ignorePattern: '[/\/]assets[/\/]images'
}
],
[
"@babel/plugin-transform-runtime",
{
useESModules: true,
regenerator: false,
},
],
['react-css-modules', {
filetypes: {
'.scss': {
syntax: 'postcss-scss',
},
},
generateScopedName: cssLocalIdent
}],
]
};

module.exports = config;
24 changes: 0 additions & 24 deletions babel.config.json

This file was deleted.

4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ set -eo pipefail
APP_NAME=$1
UPDATE_CACHE=""

docker build -f docker/Dockerfile -t $APP_NAME:latest .
docker build -f docker/Dockerfile -t $APP_NAME:latest \
--build-arg APPMODE=$APPMODE \
--build-arg APPENV=$APPENV .

docker create --name app $APP_NAME:latest

Expand Down
12 changes: 12 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
GUIKIT: {
DEBOUNCE_ON_CHANGE_TIME: 150,
},
API: {
V5: 'https://api.topcoder-dev.com/v5',
V3: 'https://api.topcoder-dev.com/v3',
},
URL: {
COMMUNITY_APP: 'https://community-app.topcoder-dev.com',
}
}
12 changes: 12 additions & 0 deletions config/development.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
GUIKIT: {
DEBOUNCE_ON_CHANGE_TIME: 150,
},
API: {
V5: "https://api.topcoder-dev.com/v5",
V3: "https://api.topcoder-dev.com/v3",
},
URL: {
COMMUNITY_APP: "https://community-app.topcoder-dev.com",
},
};
12 changes: 12 additions & 0 deletions config/production.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
GUIKIT: {
DEBOUNCE_ON_CHANGE_TIME: 150,
},
API: {
V5: "https://api.topcoder.com/v5",
V3: "https://api.topcoder.com/v3",
},
URL: {
COMMUNITY_APP: "https://community-app.topcoder.com",
},
};
Empty file added config/test.js
Empty file.
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Use the base image with Node.js
FROM node:latest

ARG APPMODE
ARG APPENV

ENV APPMODE=$APPMODE
ENV APPENV=$APPENV

# Copy the current directory into the Docker image
COPY . /micro-frontends-earn-app

Expand Down
Loading