Skip to content

Commit

Permalink
pr review change done
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-dixit committed Jun 25, 2024
1 parent b0efd0c commit a0d2d7b
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 151 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
VITE_APP_VERSION = v18.2.0
VITE_APP_VERSION = v3.0.0
GENERATE_SOURCEMAP = false

## Public URL
PUBLIC_URL=
VITE_APP_BASE_NAME=
PUBLIC_URL = https://codedthemes.com/demos/admin-templates/datta-able/react/free/
VITE_APP_BASE_NAME= demos/admin-templates/datta-able/react/free

## Google Map Key
VITE_APP_GOOGLE_MAPS_API_KEY=
Expand Down
9 changes: 0 additions & 9 deletions .env.development

This file was deleted.

9 changes: 0 additions & 9 deletions .env.qa

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: 🚚 Get latest code
uses: actions/checkout@v3

- name: Use Node.js 18
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

- name: 🔨 Build Project
run: |
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ yarn start
- Redux & React context API for state management.
- Redux toolkit.
- React Router for navigation routing.
- Support for react-script.
- Support for vite.
- Code splitting.
- CSS-in-JS.

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "datta-able-react-hook-reactstrap-js",
"version": "18.2.0",
"version": "3.0.0",
"private": true,
"scripts": {
"start": "vite",
"build": "node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
"build-stage": "env-cmd -f .env.qa node --max-old-space-size=4096 node_modules/vite/bin/vite.js build",
"preview": "vite preview",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"",
Expand All @@ -26,7 +25,6 @@
"jquery": "^3.7.1",
"process": "^0.11.10",
"react": "^18.2.0",
"react-app-polyfill": "^3.0.0",
"react-bootstrap": "^2.10.2",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.2.0",
Expand Down
3 changes: 0 additions & 3 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';

import React from 'react';
import { createRoot } from 'react-dom/client';

Expand Down
111 changes: 58 additions & 53 deletions vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,60 +1,65 @@
import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import jsconfigPaths from 'vite-jsconfig-paths';

export default defineConfig({
// depending on your application, base can also be "/"
base: process.env.VITE_APP_BASE_NAME,
plugins: [react(), jsconfigPaths()],
define: {
global: 'window'
},
resolve: {
alias: [
// { find: '', replacement: path.resolve(__dirname, 'src') },
// {
// find: /^~(.+)/,
// replacement: path.join(process.cwd(), 'node_modules/$1')
// },
// {
// find: /^src(.+)/,
// replacement: path.join(process.cwd(), 'src/$1')
// }
// {
// find: 'assets',
// replacement: path.join(process.cwd(), 'src/assets')
// },
]
},
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
port: 3000
},
css: {
preprocessorOptions: {
scss: {
charset: false
},
less: {
charset: false
}
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const API_URL = `${env.VITE_APP_BASE_NAME}`;
const PORT = `${'3000'}`;

return {
server: {
// this ensures that the browser opens upon server start
open: true,
// this sets a default port to 3000
port: PORT
},
define: {
global: 'window'
},
resolve: {
alias: [
// { find: '', replacement: path.resolve(__dirname, 'src') },
// {
// find: /^~(.+)/,
// replacement: path.join(process.cwd(), 'node_modules/$1')
// },
// {
// find: /^src(.+)/,
// replacement: path.join(process.cwd(), 'src/$1')
// }
// {
// find: 'assets',
// replacement: path.join(process.cwd(), 'src/assets')
// },
]
},
charset: false,
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
css: {
preprocessorOptions: {
scss: {
charset: false
},
less: {
charset: false
}
},
charset: false,
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
}
}
}
}
}
]
}
}
});
]
}
},
base: API_URL,
plugins: [react(), jsconfigPaths()]
};
});
68 changes: 0 additions & 68 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2886,13 +2886,6 @@ __metadata:
languageName: node
linkType: hard

"asap@npm:~2.0.6":
version: 2.0.6
resolution: "asap@npm:2.0.6"
checksum: 10c0/c6d5e39fe1f15e4b87677460bd66b66050cd14c772269cee6688824c1410a08ab20254bb6784f9afb75af9144a9f9a7692d49547f4d19d715aeb7c0318f3136d
languageName: node
linkType: hard

"ast-types-flow@npm:^0.0.8":
version: 0.0.8
resolution: "ast-types-flow@npm:0.0.8"
Expand Down Expand Up @@ -3278,13 +3271,6 @@ __metadata:
languageName: node
linkType: hard

"core-js@npm:^3.19.2":
version: 3.37.1
resolution: "core-js@npm:3.37.1"
checksum: 10c0/440eb51a7a39128a320225fe349f870a3641b96c9ecd26470227db730ef8c161ea298eaea621db66ec0ff622a85299efb4e23afebf889c0a1748616102307675
languageName: node
linkType: hard

"cosmiconfig@npm:^7.0.0":
version: 7.1.0
resolution: "cosmiconfig@npm:7.1.0"
Expand Down Expand Up @@ -3715,7 +3701,6 @@ __metadata:
prettier: "npm:3.2.5"
process: "npm:^0.11.10"
react: "npm:^18.2.0"
react-app-polyfill: "npm:^3.0.0"
react-bootstrap: "npm:^2.10.2"
react-copy-to-clipboard: "npm:^5.1.0"
react-dom: "npm:^18.2.0"
Expand Down Expand Up @@ -6286,13 +6271,6 @@ __metadata:
languageName: node
linkType: hard

"performance-now@npm:^2.1.0":
version: 2.1.0
resolution: "performance-now@npm:2.1.0"
checksum: 10c0/22c54de06f269e29f640e0e075207af57de5052a3d15e360c09b9a8663f393f6f45902006c1e71aa8a5a1cdfb1a47fe268826f8496d6425c362f00f5bc3e85d9
languageName: node
linkType: hard

"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1":
version: 1.0.1
resolution: "picocolors@npm:1.0.1"
Expand Down Expand Up @@ -6399,15 +6377,6 @@ __metadata:
languageName: node
linkType: hard

"promise@npm:^8.1.0":
version: 8.3.0
resolution: "promise@npm:8.3.0"
dependencies:
asap: "npm:~2.0.6"
checksum: 10c0/6fccae27a10bcce7442daf090279968086edd2e3f6cebe054b71816403e2526553edf510d13088a4d0f14d7dfa9b9dfb188cab72d6f942e186a4353b6a29c8bf
languageName: node
linkType: hard

"prop-types-extra@npm:^1.1.0":
version: 1.1.1
resolution: "prop-types-extra@npm:1.1.1"
Expand Down Expand Up @@ -6452,29 +6421,6 @@ __metadata:
languageName: node
linkType: hard

"raf@npm:^3.4.1":
version: 3.4.1
resolution: "raf@npm:3.4.1"
dependencies:
performance-now: "npm:^2.1.0"
checksum: 10c0/337f0853c9e6a77647b0f499beedafea5d6facfb9f2d488a624f88b03df2be72b8a0e7f9118a3ff811377d534912039a3311815700d2b6d2313f82f736f9eb6e
languageName: node
linkType: hard

"react-app-polyfill@npm:^3.0.0":
version: 3.0.0
resolution: "react-app-polyfill@npm:3.0.0"
dependencies:
core-js: "npm:^3.19.2"
object-assign: "npm:^4.1.1"
promise: "npm:^8.1.0"
raf: "npm:^3.4.1"
regenerator-runtime: "npm:^0.13.9"
whatwg-fetch: "npm:^3.6.2"
checksum: 10c0/7079c81717f4707d078943ab507771c3e80333e6c2c80c8d9a02e4a5661974e9bb196aea9f56336f559214a23f495c5f3907937d13a070e701019ae7a9d53c26
languageName: node
linkType: hard

"react-bootstrap@npm:^2.10.2":
version: 2.10.2
resolution: "react-bootstrap@npm:2.10.2"
Expand Down Expand Up @@ -6711,13 +6657,6 @@ __metadata:
languageName: node
linkType: hard

"regenerator-runtime@npm:^0.13.9":
version: 0.13.11
resolution: "regenerator-runtime@npm:0.13.11"
checksum: 10c0/12b069dc774001fbb0014f6a28f11c09ebfe3c0d984d88c9bced77fdb6fedbacbca434d24da9ae9371bfbf23f754869307fb51a4c98a8b8b18e5ef748677ca24
languageName: node
linkType: hard

"regenerator-runtime@npm:^0.14.0":
version: 0.14.1
resolution: "regenerator-runtime@npm:0.14.1"
Expand Down Expand Up @@ -7695,13 +7634,6 @@ __metadata:
languageName: node
linkType: hard

"whatwg-fetch@npm:^3.6.2":
version: 3.6.20
resolution: "whatwg-fetch@npm:3.6.20"
checksum: 10c0/fa972dd14091321d38f36a4d062298df58c2248393ef9e8b154493c347c62e2756e25be29c16277396046d6eaa4b11bd174f34e6403fff6aaca9fb30fa1ff46d
languageName: node
linkType: hard

"which-boxed-primitive@npm:^1.0.2":
version: 1.0.2
resolution: "which-boxed-primitive@npm:1.0.2"
Expand Down

0 comments on commit a0d2d7b

Please sign in to comment.