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

Commit f219e3f

Browse files
committed
Revert "Merge branch 'master' into dev"
This reverts commit 9102ccc, reversing changes made to c0de69d.
1 parent 9102ccc commit f219e3f

File tree

12 files changed

+92
-58
lines changed

12 files changed

+92
-58
lines changed

.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.
File renamed without changes.

config/index.js

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

33
module.exports = (() => {
4-
const env = process.env.NODE_ENV || "development";
4+
const env = process.env.APPENV || "dev";
55

66
// 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");
7+
if (["prod", "dev"].indexOf(env) < 0) {
8+
return require("./dev");
99
}
1010

1111
return require("./" + env);
File renamed without changes.

src/components/Pagination/styles.module.scss

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
.pagination {
44
display: flex;
5+
flex-wrap: wrap;
6+
margin-bottom: -10px;
57

68
.page {
79
padding: 0 10px;
8-
margin: 0 5px;
10+
margin: 0 5px 10px;
911
min-width: 30px;
12+
1013
}
1114

1215
.current {
@@ -17,6 +20,7 @@
1720

1821
.next {
1922
margin-left: 5px;
23+
margin-bottom: 10px;
2024

2125
> svg {
2226
transform: rotate(-90deg);
@@ -29,6 +33,7 @@
2933

3034
.prev {
3135
margin-right: 5px;
36+
margin-bottom: 10px;
3237

3338
> svg {
3439
margin-right: 3px;

src/components/SkillsList/index.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ const SkillsList = ({ requiredSkills, skills, limit = 3 }) => {
101101
<div styleName="skills-section">
102102
<div styleName="skills-title">Required Job Skills</div>
103103
<ul styleName="skills-list">
104+
{!requiredSkills.length && <li>None</li>}
104105
{requiredSkills.map((skill) => (
105106
<li key={skill.id}>
106107
{_.find(skills, { id: skill.id }) ? (

src/components/SkillsList/styles.module.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222

2323
.popover-content {
2424
display: flex;
25-
padding: 24px;
25+
flex-wrap: wrap;
26+
padding: 4px 24px 24px;
2627
}
2728

2829
.skills-section {
30+
margin-top: 20px;
2931
padding-right: 32px;
3032
}
3133

src/utils/format.js

+4
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,9 @@ export const formatDateRange = (startDate, endDate) => {
161161
const startDateStr = startDate ? moment(startDate).format(DAY_FORMAT) : "";
162162
const endDateStr = endDate ? moment(endDate).format(DAY_FORMAT) : "";
163163

164+
if (!startDateStr && !endDateStr) {
165+
return "TBD";
166+
}
167+
164168
return `${startDateStr} - ${endDateStr}`;
165169
};

webpack.config.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
/* global __dirname */
2+
const webpack = require("webpack");
23
const webpackMerge = require("webpack-merge");
34
const singleSpaDefaults = require("webpack-config-single-spa-react");
45
const path = require("path");
56
const autoprefixer = require("autoprefixer");
67

7-
const cssLocalIdent = "teams_[path][name]___[local]___[hash:base64:6]";
8+
9+
const cssLocalIdent = process.env.APPMODE === "production"
10+
? "[hash:base64:6]"
11+
: "teams_[path][name]___[local]___[hash:base64:6]";
812

913
module.exports = (webpackConfigEnv) => {
1014
const defaultConfig = singleSpaDefaults({
@@ -65,5 +69,10 @@ module.exports = (webpackConfigEnv) => {
6569
services: path.resolve(__dirname, "src/services"),
6670
},
6771
},
72+
plugins: [
73+
// ignore moment locales to reduce bundle size by 64kb gzipped
74+
// see solution details https://stackoverflow.com/questions/25384360/how-to-prevent-moment-js-from-loading-locales-with-webpack/25426019#25426019
75+
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
76+
],
6877
});
6978
};

0 commit comments

Comments
 (0)