Skip to content
Snippets Groups Projects
Commit dad7a5a6 authored by geant-release-service's avatar geant-release-service
Browse files

Finished release 0.59.

parents be786065 936c4b52
No related branches found
No related tags found
No related merge requests found
Showing
with 2534 additions and 14914 deletions
This diff is collapsed.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
This diff is collapsed.
...@@ -6,5 +6,6 @@ ...@@ -6,5 +6,6 @@
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/static/bundle.js"></script> <script src="/static/bundle.js"></script>
<link rel="stylesheet" href="/static/bundle.css">
</body> </body>
</html> </html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<div id="root"></div>
<script src="/static/survey-bundle.js"></script>
<link rel="stylesheet" href="/static/survey-bundle.css">
</body>
</html>
\ No newline at end of file
...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages ...@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='compendium-v2', name='compendium-v2',
version="0.58", version="0.59",
author='GEANT', author='GEANT',
author_email='swd@geant.org', author_email='swd@geant.org',
description='Flask and React project for displaying ' description='Flask and React project for displaying '
......
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
],
"@babel/plugin-proposal-class-properties"
]
}
**/*.css
**/*.scss
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"react-hooks"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/prop-types": "off",
"@typescript-eslint/no-unused-vars": [
"warn", { "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-empty-function": "off"
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
}
}
\ No newline at end of file
# Working with the Web App
## development environment
From this folder, run:
```bash
$ npm install
```
To run the webpack development server:
```bash
$ npm run start
```
Note that you should run the Flask application separately
and append `?test=1` to the dev url that launches in the browser.
## Releasing
To build a new bundle, run:
```bash
$ npm run build
```
This will build the new bundle and deploy it to
`compendium_v2/static/*`. This should be committed.
This diff is collapsed.
{
"name": "compendium-survey",
"version": "1.0.0",
"devDependencies": {
"@babel/core": "^7.22.1",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-transform-runtime": "^7.22.4",
"@babel/preset-env": "^7.22.4",
"@babel/preset-react": "^7.22.3",
"@babel/preset-typescript": "^7.21.5",
"@babel/runtime": "^7.22.3",
"@types/react": "^18.2.8",
"@types/react-dom": "^18.2.4",
"@types/react-router-dom": "^5.3.3",
"@types/webpack": "^5.28.1",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"babel-loader": "^9.1.2",
"css-loader": "^6.8.1",
"eslint": "^8.42.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"image-webpack-loader": "^8.1.0",
"mini-css-extract-plugin": "^2.7.6",
"sass": "^1.62.1",
"sass-loader": "^13.3.1",
"style-loader": "^3.3.3",
"ts-node": "^10.9.1",
"typescript": "^5.1.3",
"url-loader": "^4.1.1",
"webpack": "^5.85.0",
"webpack-cli": "^5.1.2",
"webpack-dev-server": "^4.15.0"
},
"resolutions": {
"@types/webpack": "^5.28.0",
"@types/webpack-dev-server": "^4.7.2"
},
"scripts": {
"start": "webpack serve --mode development --port 4001",
"build": "webpack --mode production"
},
"dependencies": {
"bootstrap": "^5.3.0",
"react": "^18.2.0",
"react-bootstrap": "^2.7.4",
"react-dom": "^18.2.0",
"react-icons": "^4.9.0",
"react-router-dom": "^6.11.2",
"survey-react-ui": "^1.9.103",
"react-hot-toast": "^2.4.1",
"xlsx": "^0.18.5"
}
}
declare module '*png';
declare module '*svg';
declare module '*jpg';
declare module '*jpeg';
declare module '*gif';
declare module '*webp';
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<div id="root"></div>
<script src="/survey-bundle.js"></script>
</body>
</html>
\ No newline at end of file
{
"compilerOptions": {
"target": "ES6",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"esModuleInterop": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react",
"declaration": true,
"declarationDir": "dist/types",
"noImplicitAny": false,
"paths": {
"shared/*": ["../compendium-frontend/src/shared/*"]
}
},
"include": ["src"]
}
import path from "path";
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
import MiniCssExtractPlugin from "mini-css-extract-plugin";
import { Configuration as WebpackConfiguration } from "webpack";
import { Configuration as WebpackDevServerConfiguration } from "webpack-dev-server";
interface Configuration extends WebpackConfiguration {
devServer?: WebpackDevServerConfiguration;
}
const isProduction = process.argv[process.argv.indexOf('--mode') + 1] === 'production';
console.log(isProduction ? 'Production build' : 'Development build')
const config: Configuration = {
entry: "./src/index.tsx",
module: {
rules: [
{
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript",
],
},
},
},
{
test: /\.scss$/,
exclude: /node_modules/,
use: [
isProduction ? MiniCssExtractPlugin.loader : "style-loader",
"css-loader",
"sass-loader",
],
},
{
test: /\.css$/,
use: [
isProduction ? MiniCssExtractPlugin.loader : "style-loader",
"css-loader"
],
},
{
test: /\.(png|svg|jpe?g|gif)$/,
type: 'asset/resource'
},
],
},
resolve: {
extensions: [".tsx", ".ts", ".js", ".html", '.svg'],
alias: {
shared: path.resolve(__dirname, '../compendium-frontend/src/shared/'),
react: path.resolve('./node_modules/react'), // necessary to prevent react from being loaded twice in shared components
},
modules: [
path.resolve(__dirname, 'node_modules'),
path.resolve(__dirname, '../compendium-frontend/node_modules'),
],
},
output: {
path: path.resolve(__dirname, "..", "compendium_v2", "static"),
filename: "survey-bundle.js",
},
devServer: {
static: path.resolve(__dirname, "..", "survey-frontend", "static"),
compress: true,
open: ["http://localhost:4001/survey"],
port: 4001,
// Allow SPA urls to work with dev-server
historyApiFallback: true,
proxy: {
"/api": "http://127.0.0.1:5000",
"/login": "http://127.0.0.1:5000",
"/logout": "http://127.0.0.1:5000",
"/authorize": "http://127.0.0.1:5000",
},
},
devtool: isProduction ? undefined : "inline-source-map",
plugins: [
new ForkTsCheckerWebpackPlugin({
async: false,
}),
new MiniCssExtractPlugin(
{
filename: 'survey-bundle.css',
}
),
],
};
export default config;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment