Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts #1436 #1467

Merged
merged 3 commits into from
Jan 21, 2024
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
16 changes: 12 additions & 4 deletions scripts/config-overrides/custom_start.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
require('dotenv').config();
const { spawn } = require('child_process');

//const react_script_start = 'npx react-scripts start';
const reactAppRewiredStart =
'npx react-app-rewired start --config-overrides=scripts/config-overrides/';
const react_script_start = 'npx react-scripts start';
const react_app_rewired_start = 'npx react-app-rewired start --config-overrides=scripts/config-overrides';

if (process.env.ALLOW_LOGS === "YES") {
// Execute the npm command
spawn(react_app_rewired_start, { stdio: 'inherit', shell: true });

}
else {
// Execute the npm command
spawn(react_script_start, { stdio: 'inherit', shell: true });
}

spawn(reactAppRewiredStart, { stdio: 'inherit', shell: true });
87 changes: 24 additions & 63 deletions scripts/config-overrides/index.js
Original file line number Diff line number Diff line change
@@ -1,68 +1,29 @@
const {
override,
addWebpackPlugin,
overrideDevServer,
} = require('customize-cra');
const { override, addWebpackPlugin } = require('customize-cra');
const webpack = require('webpack');
const fs = require('fs');
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const redirectServedPath = require('react-dev-utils/redirectServedPathMiddleware');
const paths = require('react-scripts/config/paths');
const isAllowLogEnabled = process.env.ALLOW_LOGS === 'YES';
module.exports = {
webpack: override(
// Add your new webpack plugin
isAllowLogEnabled &&
(addWebpackPlugin(
new webpack.ProgressPlugin({
activeModules: true,
entries: true,
handler: (percentage, message, ...args) => {
// Log a custom progress message with active module and its count
console.info(
`<Webpack-Progress>: ${Math.floor(percentage * 100)}% ${message}`
);
},
modules: true,
modulesCount: 5000,
profile: false,
dependencies: true,
dependenciesCount: 10000,
percentBy: null,
})
),
// Modify infrastructureLogging level
(config) => {
config.infrastructureLogging = {
level: 'verbose',
};
return config;
})
),
devServer: overrideDevServer((config) => {
// Remove onAfterSetupMiddleware and onBeforeSetupMiddleware
config.onAfterSetupMiddleware = undefined;
config.onBeforeSetupMiddleware = undefined;

// Add devServer.setupMiddlewares
config.setupMiddlewares = (middlewares, devServer) => {
if (!devServer) {
throw new Error('webpack-dev-server is not defined');
}

if (fs.existsSync(paths.proxySetup)) {
require(paths.proxySetup)(devServer.app);
}
module.exports = override(
// Add your new webpack plugin
addWebpackPlugin(new webpack.ProgressPlugin({
activeModules: true,
entries: true,
handler: (percentage, message, ...args) => {
// Log a custom progress message with active module and its count
console.info(`<Webpack-Progress>: ${Math.floor(percentage * 100)}% ${message}`);
},
modules: true,
modulesCount: 5000,
profile: false,
dependencies: true,
dependenciesCount: 10000,
percentBy: null,
})),

middlewares.push(
evalSourceMapMiddleware(devServer),
redirectServedPath(paths.publicUrlOrPath),
noopServiceWorkerMiddleware(paths.publicUrlOrPath)
// Add your additional middlewares here if needed
);

return middlewares;
// Modify infrastructureLogging level
(config) => {
config.infrastructureLogging = {
level: 'verbose',
};
}),
};
return config;
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#### Defined in

[src/components/AddOn/support/services/Plugin.helper.ts:7](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/AddOn/support/services/Plugin.helper.ts#L7)
[src/components/AddOn/support/services/Plugin.helper.ts:7](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/AddOn/support/services/Plugin.helper.ts#L7)

___

Expand All @@ -52,7 +52,7 @@ ___

#### Defined in

[src/components/AddOn/support/services/Plugin.helper.ts:2](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/AddOn/support/services/Plugin.helper.ts#L2)
[src/components/AddOn/support/services/Plugin.helper.ts:2](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/AddOn/support/services/Plugin.helper.ts#L2)

___

Expand All @@ -72,4 +72,4 @@ ___

#### Defined in

[src/components/AddOn/support/services/Plugin.helper.ts:12](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/AddOn/support/services/Plugin.helper.ts#L12)
[src/components/AddOn/support/services/Plugin.helper.ts:12](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/AddOn/support/services/Plugin.helper.ts#L12)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

[src/components/CheckIn/types.ts:8](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L8)
[src/components/CheckIn/types.ts:8](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L8)

___

Expand All @@ -30,7 +30,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:10](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L10)
[src/components/CheckIn/types.ts:10](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L10)

___

Expand All @@ -40,4 +40,4 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:9](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L9)
[src/components/CheckIn/types.ts:9](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L9)
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@

#### Defined in

[src/components/CheckIn/types.ts:19](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L19)
[src/components/CheckIn/types.ts:19](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L19)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

[src/components/CheckIn/types.ts:27](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L27)
[src/components/CheckIn/types.ts:27](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L27)

___

Expand All @@ -38,7 +38,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:28](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L28)
[src/components/CheckIn/types.ts:28](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L28)

___

Expand All @@ -48,4 +48,4 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:26](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L26)
[src/components/CheckIn/types.ts:26](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L26)
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#### Defined in

[src/components/CheckIn/types.ts:35](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L35)
[src/components/CheckIn/types.ts:35](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L35)

___

Expand All @@ -32,7 +32,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:41](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L41)
[src/components/CheckIn/types.ts:41](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L41)

___

Expand All @@ -42,7 +42,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:32](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L32)
[src/components/CheckIn/types.ts:32](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L32)

___

Expand All @@ -52,7 +52,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:33](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L33)
[src/components/CheckIn/types.ts:33](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L33)

___

Expand All @@ -62,4 +62,4 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:34](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L34)
[src/components/CheckIn/types.ts:34](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L34)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

[src/components/CheckIn/types.ts:47](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L47)
[src/components/CheckIn/types.ts:47](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L47)

___

Expand All @@ -30,7 +30,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:46](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L46)
[src/components/CheckIn/types.ts:46](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L46)

___

Expand All @@ -40,4 +40,4 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:45](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L45)
[src/components/CheckIn/types.ts:45](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L45)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#### Defined in

[src/components/CheckIn/types.ts:2](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L2)
[src/components/CheckIn/types.ts:2](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L2)

___

Expand All @@ -30,7 +30,7 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:3](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L3)
[src/components/CheckIn/types.ts:3](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L3)

___

Expand All @@ -40,4 +40,4 @@ ___

#### Defined in

[src/components/CheckIn/types.ts:4](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CheckIn/types.ts#L4)
[src/components/CheckIn/types.ts:4](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CheckIn/types.ts#L4)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#### Defined in

[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:9](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L9)
[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:9](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L9)

___

Expand All @@ -29,4 +29,4 @@ ___

#### Defined in

[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:10](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L10)
[src/components/CollapsibleDropdown/CollapsibleDropdown.tsx:10](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/CollapsibleDropdown/CollapsibleDropdown.tsx#L10)
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#### Defined in

[src/components/IconComponent/IconComponent.tsx:18](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/IconComponent/IconComponent.tsx#L18)
[src/components/IconComponent/IconComponent.tsx:17](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/IconComponent/IconComponent.tsx#L17)

___

Expand All @@ -31,7 +31,7 @@ ___

#### Defined in

[src/components/IconComponent/IconComponent.tsx:19](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/IconComponent/IconComponent.tsx#L19)
[src/components/IconComponent/IconComponent.tsx:18](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/IconComponent/IconComponent.tsx#L18)

___

Expand All @@ -41,7 +41,7 @@ ___

#### Defined in

[src/components/IconComponent/IconComponent.tsx:17](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/IconComponent/IconComponent.tsx#L17)
[src/components/IconComponent/IconComponent.tsx:16](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/IconComponent/IconComponent.tsx#L16)

___

Expand All @@ -51,4 +51,4 @@ ___

#### Defined in

[src/components/IconComponent/IconComponent.tsx:20](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/IconComponent/IconComponent.tsx#L20)
[src/components/IconComponent/IconComponent.tsx:19](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/IconComponent/IconComponent.tsx#L19)
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- [event](components_LeftDrawerEvent_LeftDrawerEvent.InterfaceLeftDrawerProps.md#event)
- [hideDrawer](components_LeftDrawerEvent_LeftDrawerEvent.InterfaceLeftDrawerProps.md#hidedrawer)
- [setHideDrawer](components_LeftDrawerEvent_LeftDrawerEvent.InterfaceLeftDrawerProps.md#sethidedrawer)
- [setShowAddEventProjectModal](components_LeftDrawerEvent_LeftDrawerEvent.InterfaceLeftDrawerProps.md#setshowaddeventprojectmodal)

## Properties

Expand All @@ -31,7 +30,7 @@

#### Defined in

[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:16](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L16)
[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:16](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L16)

___

Expand All @@ -41,7 +40,7 @@ ___

#### Defined in

[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:24](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L24)
[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:24](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L24)

___

Expand All @@ -51,14 +50,4 @@ ___

#### Defined in

[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:25](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L25)

___

### setShowAddEventProjectModal

• **setShowAddEventProjectModal**: `Dispatch`\<`SetStateAction`\<`boolean`\>\>

#### Defined in

[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:26](https://github.com/disha1202/talawa-admin/blob/6c7f6a1/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L26)
[src/components/LeftDrawerEvent/LeftDrawerEvent.tsx:25](https://github.com/palisadoes/talawa-admin/blob/5828937/src/components/LeftDrawerEvent/LeftDrawerEvent.tsx#L25)
Loading
Loading