Skip to content

Commit

Permalink
Revert "Feature/vite (#206)" (#209)
Browse files Browse the repository at this point in the history
This reverts commit f1abb60.
  • Loading branch information
CourtneyGosselin authored Feb 26, 2025
1 parent f1abb60 commit 2987ed0
Show file tree
Hide file tree
Showing 138 changed files with 18,136 additions and 8,474 deletions.
16 changes: 8 additions & 8 deletions .env.docker
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
VITE_KATSU_API_SERVER='${VITE_KATSU_API_SERVER}'
VITE_FEDERATION_API_SERVER='${VITE_FEDERATION_API_SERVER}'
VITE_BASE_NAME=${VITE_BASE_NAME}
VITE_SITE_LOCATION = '${VITE_SITE_LOCATION}'
VITE_HTSGET_SERVER ='${VITE_HTSGET_SERVER}'
VITE_CANDIG_VERSION='${VITE_CANDIG_VERSION}'
VITE_AGGREGATE_COUNT_THRESHOLD='${AGGREGATE_COUNT_THRESHOLD}'
REACT_APP_KATSU_API_SERVER='${REACT_APP_KATSU_API_SERVER}'
REACT_APP_FEDERATION_API_SERVER='${REACT_APP_FEDERATION_API_SERVER}'
REACT_APP_BASE_NAME=${REACT_APP_BASE_NAME}
REACT_APP_SITE_LOCATION = '${REACT_APP_SITE_LOCATION}'
REACT_APP_HTSGET_SERVER ='${REACT_APP_HTSGET_SERVER}'
REACT_APP_CANDIG_VERSION='${REACT_APP_CANDIG_VERSION}'
REACT_APP_AGGREGATE_COUNT_THRESHOLD='${AGGREGATE_COUNT_THRESHOLD}'
DISABLE_ESLINT_PLUGIN='${DISABLE_ESLINT}'
GENERATE_SOURCEMAP=false
VITE_SUPPORT_EMAIL='${VITE_SUPPORT_EMAIL}'
REACT_APP_SUPPORT_EMAIL='${REACT_APP_SUPPORT_EMAIL}'
67 changes: 67 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb",
"prettier",
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime"
],
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src/"]
}
}
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"impliedStrict": true
},
"ecmaVersion": 12
},
"plugins": ["prettier", "react", "react-hooks"],
"rules": {
"react/jsx-filename-extension": 0,
"no-param-reassign": 0,
"react/prop-types": 1,
"react/require-default-props": 0,
"react/no-array-index-key": 0,
"react/jsx-props-no-spreading": 0,
"react/forbid-prop-types": 0,
"import/order": 0,
"no-console": 0,
"jsx-a11y/anchor-is-valid": 0,
"prefer-destructuring": 0,
"no-shadow": 0,
"no-unused-vars": [
1,
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"ignoreRestSiblings": false
}
],
"prettier/prettier": [
2,
{
"bracketSpacing": true,
"printWidth": 140,
"singleQuote": true,
"trailingComma": "none",
"tabWidth": 4,
"useTabs": false,
"endOfLine": "auto",
"camelcase": "off"
}
]
}
}
17 changes: 2 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

# production
/build
/dist
/dist-ssr

# misc
.DS_Store
Expand All @@ -20,16 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
*.local

# editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/.idea/
yarn.lock
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ npm install

The file `.env.development` is where you specify API Servers and site-specific variables.

- `VITE_KATSU_API_SERVER`: Path to the Katsu API.
- `VITE_BASE_NAME`: The prepending path of your server. For example, if you would like your app to be available at `/v2/data-portal`, you should specify the aforementioned value here. By default, the app will be running at root.
- `VITE_SITE_LOCATION`: If you specify `BCGSC` or `UHN`, the app will display the logo of respective institution.
- `REACT_APP_KATSU_API_SERVER`: Path to the Katsu API.
- `REACT_APP_BASE_NAME`: The prepending path of your server. For example, if you would like your app to be available at `/v2/data-portal`, you should specify the aforementioned value here. By default, the app will be running at root.
- `REACT_APP_SITE_LOCATION`: If you specify `BCGSC` or `UHN`, the app will display the logo of respective institution.
- `GENERATE_SOURCEMAP`: Removes map fodlers from build when set to false

After this you can start the application by running **npm start**
Expand Down Expand Up @@ -55,7 +55,7 @@ To create a production build, use yarn build.

You would need to specify the variables required in `.env.production`, see the section above on what values are required for which variables.

One thing worth noting is that the `VITE_BASE_NAME` variable only affects the routes of the app. The static assets are still served from root.
One thing worth noting is that the `REACT_APP_BASE_NAME` variable only affects the routes of the app. The static assets are still served from root.

As an example, if you would like the app's static assets to be served at `/v2/data-portal`, you would need to specify this line at `package.json`.

Expand Down
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ if [[ -f "initial_setup" ]]; then
rm initial_setup
fi

npx vite
# npm start
npm start
# npm run build
85 changes: 0 additions & 85 deletions eslint.config.jsx

This file was deleted.

Loading

0 comments on commit 2987ed0

Please sign in to comment.