From 9c36c0d219b6b4a8d3ab8e00cd2ee1284334ca25 Mon Sep 17 00:00:00 2001 From: nkumar-topcoder <33625707+nkumar-topcoder@users.noreply.github.com> Date: Wed, 27 Jan 2021 17:53:41 +0530 Subject: [PATCH] Revert "Dry Release v0.2.2" --- .vscode/settings.json | 5 -- README.md | 2 +- babel.config.js | 59 -------------------- babel.config.json | 51 +++++++++++++++++ config/{dev.js => development.js} | 0 config/index.js | 6 +- config/{prod.js => production.js} | 0 src/components/Pagination/styles.module.scss | 7 +-- src/components/SkillsList/index.jsx | 1 - src/components/SkillsList/styles.module.scss | 4 +- src/utils/format.js | 4 -- webpack.config.js | 11 +--- 12 files changed, 58 insertions(+), 92 deletions(-) delete mode 100644 .vscode/settings.json delete mode 100644 babel.config.js create mode 100644 babel.config.json rename config/{dev.js => development.js} (100%) rename config/{prod.js => production.js} (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ea4cddfc..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "javascript.preferences.quoteStyle": "double", - "typescript.preferences.quoteStyle": "double", - "prettier.jsxSingleQuote": false -} diff --git a/README.md b/README.md index 4a827f43..aa44f185 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This is a [single-spa](https://single-spa.js.org/) example React microapp. ## Config -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`. +For available variables config which depend on the running environment (`development` or `production`), please refer to `config/development.js` and `config/production.js`. For application constants which don't depend on the running environment use `src/constants/index.js`. diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 07815e13..00000000 --- a/babel.config.js +++ /dev/null @@ -1,59 +0,0 @@ -module.exports = function (api) { - const isProd = process.env.APPMODE === "production"; - api.cache(!isProd); - - const generateScopedName = isProd - ? "[hash:base64:6]" - : "teams_[path][name]___[local]___[hash:base64:6]"; - return { - presets: ["@babel/preset-env", "@babel/preset-react"], - plugins: [ - [ - "@babel/plugin-transform-runtime", - { - useESModules: true, - regenerator: false, - }, - ], - [ - "react-css-modules", - { - filetypes: { - ".scss": { - syntax: "postcss-scss", - }, - }, - generateScopedName, - }, - ], - "inline-react-svg", - ], - env: { - test: { - presets: [ - [ - "@babel/preset-env", - { - targets: "current node", - }, - ], - ], - plugins: [ - [ - "module-resolver", - { - alias: { - styles: "./src/styles", - components: "./src/components", - hooks: "./src/hooks", - utils: "./src/utils", - constants: "./src/constants", - services: "./src/services", - }, - }, - ], - ], - }, - }, - }; -}; diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 00000000..00432fb5 --- /dev/null +++ b/babel.config.json @@ -0,0 +1,51 @@ +{ + "presets": [ + "@babel/preset-env", + "@babel/preset-react" + ], + "plugins": [ + [ + "@babel/plugin-transform-runtime", + { + "useESModules": true, + "regenerator": false + } + ], + [ + "react-css-modules", + { + "filetypes": { + ".scss": { + "syntax": "postcss-scss" + } + }, + "generateScopedName": "teams_[path][name]___[local]___[hash:base64:6]" + } + ], + "inline-react-svg" + ], + "env": { + "test": { + "presets": [ + [ + "@babel/preset-env", + { + "targets": "current node" + } + ] + ], + "plugins": [ + ["module-resolver", { + "alias": { + "styles": "./src/styles", + "components": "./src/components", + "hooks": "./src/hooks", + "utils": "./src/utils", + "constants": "./src/constants", + "services": "./src/services" + } + }] + ] + } + } +} diff --git a/config/dev.js b/config/development.js similarity index 100% rename from config/dev.js rename to config/development.js diff --git a/config/index.js b/config/index.js index 0de81581..d89d9220 100644 --- a/config/index.js +++ b/config/index.js @@ -1,11 +1,11 @@ /* global process */ module.exports = (() => { - const env = process.env.APPENV || "dev"; + const env = process.env.NODE_ENV || "development"; // for security reason don't let to require any arbitrary file defined in process.env - if (["prod", "dev"].indexOf(env) < 0) { - return require("./dev"); + if (["production", "development"].indexOf(env) < 0) { + return require("./development"); } return require("./" + env); diff --git a/config/prod.js b/config/production.js similarity index 100% rename from config/prod.js rename to config/production.js diff --git a/src/components/Pagination/styles.module.scss b/src/components/Pagination/styles.module.scss index 5c918ff5..9f0ce714 100644 --- a/src/components/Pagination/styles.module.scss +++ b/src/components/Pagination/styles.module.scss @@ -2,14 +2,11 @@ .pagination { display: flex; - flex-wrap: wrap; - margin-bottom: -10px; .page { padding: 0 10px; - margin: 0 5px 10px; + margin: 0 5px; min-width: 30px; - } .current { @@ -20,7 +17,6 @@ .next { margin-left: 5px; - margin-bottom: 10px; > svg { transform: rotate(-90deg); @@ -33,7 +29,6 @@ .prev { margin-right: 5px; - margin-bottom: 10px; > svg { margin-right: 3px; diff --git a/src/components/SkillsList/index.jsx b/src/components/SkillsList/index.jsx index c4cc1ae4..edc64219 100644 --- a/src/components/SkillsList/index.jsx +++ b/src/components/SkillsList/index.jsx @@ -101,7 +101,6 @@ const SkillsList = ({ requiredSkills, skills, limit = 3 }) => {
Required Job Skills