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

Commit c16c3e2

Browse files
Merge pull request #77 from topcoder-platform/dev
[PROD] Release 1.5
2 parents dc81fbc + 3fb3593 commit c16c3e2

File tree

130 files changed

+5804
-337
lines changed

Some content is hidden

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

130 files changed

+5804
-337
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ workflows:
7777
branches:
7878
only:
7979
- dev
80+
- dev-1_5
8081

8182
# Production builds are exectuted only on tagged commits to the
8283
# master branch.

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"javascript.preferences.quoteStyle": "double",
3+
"typescript.preferences.quoteStyle": "double",
4+
"prettier.jsxSingleQuote": false
5+
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This is a [single-spa](https://single-spa.js.org/) example React microapp.
2020

2121
## Config
2222

23-
For available variables config which depend on the running environment (`development` or `production`), please refer to `config/development.js` and `config/production.js`.
23+
For available variables config which depend on the running environment (`APPENV=dev` or `APPENV=prod`), please refer to `config/dev.js` and `config/prod.js`.
2424

2525
For application constants which don't depend on the running environment use `src/constants/index.js`.
2626

babel.config.js

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
module.exports = function (api) {
2+
const isProd = process.env.APPMODE === "production";
3+
api.cache(!isProd);
4+
5+
const generateScopedName = isProd
6+
? "[hash:base64:6]"
7+
: "teams_[path][name]___[local]___[hash:base64:6]";
8+
return {
9+
presets: ["@babel/preset-env", "@babel/preset-react"],
10+
plugins: [
11+
[
12+
"@babel/plugin-transform-runtime",
13+
{
14+
useESModules: true,
15+
regenerator: false,
16+
},
17+
],
18+
[
19+
"react-css-modules",
20+
{
21+
filetypes: {
22+
".scss": {
23+
syntax: "postcss-scss",
24+
},
25+
},
26+
generateScopedName,
27+
},
28+
],
29+
"inline-react-svg",
30+
],
31+
env: {
32+
test: {
33+
presets: [
34+
[
35+
"@babel/preset-env",
36+
{
37+
targets: "current node",
38+
},
39+
],
40+
],
41+
plugins: [
42+
[
43+
"module-resolver",
44+
{
45+
alias: {
46+
styles: "./src/styles",
47+
components: "./src/components",
48+
hooks: "./src/hooks",
49+
utils: "./src/utils",
50+
constants: "./src/constants",
51+
services: "./src/services",
52+
},
53+
},
54+
],
55+
],
56+
},
57+
},
58+
};
59+
};

babel.config.json

-51
This file was deleted.

config/development.js renamed to config/dev.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ module.exports = {
99
*/
1010
CONNECT_WEBSITE_URL: "https://connect.topcoder-dev.com",
1111

12-
/**
13-
* Email to report issues to
14-
*/
15-
EMAIL_REPORT_ISSUE: "[email protected]",
16-
1712
/**
1813
* Email to request extension
1914
*/
2015
EMAIL_REQUEST_EXTENSION: "[email protected]",
2116

2217
API: {
2318
V5: "https://api.topcoder-dev.com/v5",
19+
V3: "https://api.topcoder-dev.com/v3",
2420
},
2521
};

config/index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
/* global process */
22

33
module.exports = (() => {
4-
const env = process.env.NODE_ENV || "development";
4+
const env = process.env.APPENV || "dev";
5+
6+
console.info(`APPENV: "${env}"`);
57

68
// for security reason don't let to require any arbitrary file defined in process.env
7-
if (["production", "development"].indexOf(env) < 0) {
8-
return require("./development");
9+
if (["prod", "dev"].indexOf(env) < 0) {
10+
return require("./dev");
911
}
1012

1113
return require("./" + env);

config/production.js renamed to config/prod.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ module.exports = {
99
*/
1010
CONNECT_WEBSITE_URL: "https://connect.topcoder.com",
1111

12-
/**
13-
* Email to report issues to
14-
*/
15-
EMAIL_REPORT_ISSUE: "[email protected]",
16-
1712
/**
1813
* Email to request extension
1914
*/
2015
EMAIL_REQUEST_EXTENSION: "[email protected]",
2116

2217
API: {
2318
V5: "https://api.topcoder.com/v5",
19+
V3: "https://api.topcoder.com/v3",
2420
},
2521
};

docker/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3'
1+
version: "3"
22
services:
33
taas-app:
44
image: taas-app:latest

0 commit comments

Comments
 (0)