Skip to content

Commit

Permalink
chore: Cleanup Configs (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: Lokesh Jain <[email protected]>
Co-authored-by: Pritish Budhiraja <[email protected]>
Co-authored-by: Jeeva Ramachandran <[email protected]>
  • Loading branch information
4 people authored Dec 5, 2023
1 parent 4f69afe commit 5bfae97
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 81 deletions.
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@
"author": "Shiva Nandan <[email protected]>",
"license": "MIT",
"scripts": {
"setup-env": "chmod +x ./replace_env.sh && ./replace_env.sh",
"pre-commit": "bash .githooks/commit-msg",
"start": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && appName=hyperswitch webpack serve --config webpack.dev.js",
"start:server_compiler": "webpack --config webpack.server.js --watch",
"start": "npm run setup-env && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && appName=hyperswitch webpack serve --config webpack.dev.js",
"serve": "npm run setup-env && cp env-config.js ./dist/hyperswitch && node dist/server/server.js",
"prod:start": "webpack serve --config webpack.dev.js",
"build:prod": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && webpack --config webpack.prod.js",
"ssr_sript_build": "BRANCH_NAME=ssr webpack --config webpack.prod.js",
"ssr_run_server": "node --watch dist/server/server.js",
"build:netlify": "webpack --config webpack.prod.js --env netlifyHosted",
"build:test": "cd tests && npx rescript build -with-deps",
"build:prod": "npm run setup-env && cp env-config.js ./public/hyperswitch && APP_VERSION=$npm_package_version && webpack --config webpack.prod.js",
"re:build": "rescript",
"re:clean": "rescript clean",
"re:start": "rescript build -w",
"re:format": "rescript format -all",
"use-prod-ec": "mv public/_redirects_for_prod public/_redirects",
"serve": "chmod +x ./replace_env.sh && ./replace_env.sh && cp env-config.js ./dist/hyperswitch && node dist/server/server.js",
"build:test": "cd tests && npx rescript build -with-deps",
"clean:test": "cd tests && npx rescript clean -with-deps",
"unit:test": "cd tests && npx rescript build -with-deps && jest unit_test",
"revert:test": "cd tests && npx rescript clean -with-deps && cd .. && npx rescript build -with-deps",
"postinstall": "git config core.hooksPath .githooks && chmod +x .githooks/commit-msg"
},
"husky": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoadedTable.res
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ let make = (
? ""
: `${isMinHeightRequired ? noScrollbar ? "" : "overflow-x-scroll" : "overflow-scroll"}`
let loadedTable =
<div className={`no-scrollbar ${scrollBarClass} no-scrollbar`}>
<div className={`no-scrollbar ${scrollBarClass}`}>
{switch dataView {
| Table => {
let children =
Expand Down
13 changes: 6 additions & 7 deletions src/components/Loader.res
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,19 @@ let make = (
<div className={`${animationType} mb-10`}>
<Icon name="spinner" size customIconColor=customSpinnerIconColor />
</div>
{React.string(loadingText)}
{children}
</div>

<div className="flex flex-col">
<div className="w-full flex justify-center py-10">
<div className="w-20 h-16">
<div className="scale-400 pt-px">
<React.Suspense fallback={loader}>
<ErrorBoundary>
<React.Suspense fallback={loader}>
<ErrorBoundary>
<div className="scale-400 pt-px">
<Lottie animationData={loaderLottieFile} autoplay=true loop=true />
</ErrorBoundary>
</React.Suspense>
</div>
</div>
</ErrorBoundary>
</React.Suspense>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/entryPoints/hyperswitch/HyperSwitchApp.res
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ let make = () => {
</div>
</div>
<div
className="w-full h-screen overflow-x-scroll xl:overflow-x-hidden overflow-y-scroll ">
className="w-full h-screen overflow-x-scroll xl:overflow-x-hidden overflow-y-scroll">
<div
className="w-full h-full max-w-fixedPageWidth p-6 md:px-16 md:pb-16 pt-[3rem] overflow-scroll md:overflow-y-scroll md:overflow-x-hidden flex flex-col gap-10">
<ErrorBoundary>
Expand Down
34 changes: 0 additions & 34 deletions tests/bsconfig.json

This file was deleted.

13 changes: 0 additions & 13 deletions tests/marketplace/unit_test/InitTest.res

This file was deleted.

15 changes: 1 addition & 14 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,10 @@ const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin"
const tailwindcss = require("tailwindcss");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");

const appEntryPoint = {
hyperswitch: "hyperswitch/HyperSwitchEntry",
};

function getAppEntryPoint(appName) {
const path = appEntryPoint[appName];
if (path) {
return `./src/entryPoints/${path}.bs.js`;
} else {
return undefined;
}
}

module.exports = (appName = "hyperswitch", publicPath = "auto") => {
const isDevelopment = process.env.NODE_ENV !== "production";
let entryObj = {
app: getAppEntryPoint(appName),
app: `./src/entryPoints/hyperswitch/HyperSwitchEntry.bs.js`,
};
return {
entry: entryObj,
Expand Down

0 comments on commit 5bfae97

Please sign in to comment.