generated from graasp/graasp-repo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
14,416 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build | ||
public | ||
coverage | ||
src/serviceWorker.js | ||
cypress/integration/examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"extends": ["react-app", "airbnb", "prettier"], | ||
"plugins": ["import", "jsx-a11y", "react"], | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"mocha": true, | ||
"jest": true | ||
}, | ||
"globals": { | ||
"cy": true, | ||
"Cypress": true | ||
}, | ||
"parser": "babel-eslint", | ||
"rules": { | ||
"no-underscore-dangle": [ | ||
"error", | ||
{ | ||
"allow": ["_id", "__REDUX_DEVTOOLS_EXTENSION__"] | ||
} | ||
], | ||
"jsx-a11y/anchor-is-valid": [ | ||
"error", | ||
{ | ||
"components": ["Link"], | ||
"specialLink": ["to", "hrefLeft", "hrefRight"], | ||
"aspects": ["noHref", "invalidHref", "preferButton"] | ||
} | ||
], | ||
"react/jsx-filename-extension": [ | ||
1, | ||
{ | ||
"extensions": [".js", ".jsx"] | ||
} | ||
], | ||
"import/no-named-as-default": 0, | ||
"react/static-property-placement": [ | ||
"error", | ||
"property assignment", | ||
{ | ||
"childContextTypes": "static public field", | ||
"contextTypes": "static public field", | ||
"contextType": "static public field", | ||
"defaultProps": "static public field", | ||
"displayName": "static public field", | ||
"propTypes": "static public field" | ||
} | ||
], | ||
"react/state-in-constructor": ["error", "never"], | ||
"no-console": [2, { "allow": ["error"] }], | ||
"no-restricted-syntax": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# environment files but not encrypted ones | ||
.env* | ||
!.env.*.encrypted | ||
|
||
# cache | ||
.eslintcache | ||
|
||
# testing and coverage | ||
cypress/screenshots | ||
cypress/videos | ||
/.nyc_output | ||
/coverage | ||
|
||
|
||
# jetbrains | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commit-msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
git status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint | ||
yarn build | ||
yarn test:once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS", | ||
"post-checkout": "yarn install", | ||
"post-commit": "git status", | ||
"post-merge": "yarn install", | ||
"pre-push": "yarn lint && yarn build && yarn test:once" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
save-exact=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests" | ||
}, | ||
{ | ||
"type": "build", | ||
"section": "Build System" | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "Continuous Integration" | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Chores", | ||
"hidden": true | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Graasp Perform | ||
|
||
## Installation | ||
|
||
1. Run `yarn` to install the dependencies | ||
2. Run the API at `localhost:3000` | ||
3. Set the following environnement variables in `.env.local` | ||
|
||
``` | ||
REACT_APP_API_HOST=http://localhost:3000 | ||
PORT=3111 | ||
REACT_APP_SHOW_NOTIFICATIONS=true | ||
REACT_APP_AUTHENTICATION_HOST=http://localhost:3001 | ||
``` | ||
|
||
4. Run `yarn start`. The client should be accessible at `localhost:3111` | ||
|
||
## Testing | ||
|
||
Set the following environnement variables in `.env.test` | ||
|
||
``` | ||
REACT_APP_API_HOST=http://localhost:3000 | ||
PORT=3111 | ||
REACT_APP_SHOW_NOTIFICATIONS=false | ||
REACT_APP_NODE_ENV=test | ||
``` | ||
|
||
Run `yarn cypress`. This should run every tests headlessly. | ||
You can run `yarn cypress:open` to access the framework and visually display the tests' processes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"name": "graasp-perform", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@material-ui/core": "4.11.4", | ||
"@material-ui/icons": "4.11.2", | ||
"@material-ui/lab": "4.0.0-alpha.58", | ||
"clsx": "1.1.1", | ||
"connected-react-router": "6.9.1", | ||
"history": "5.0.0", | ||
"http-status-codes": "2.1.4", | ||
"i18next": "20.2.2", | ||
"immutable": "4.0.0-rc.12", | ||
"lodash.truncate": "4.4.2", | ||
"node-fetch": "2.6.1", | ||
"prop-types": "15.7.2", | ||
"qs": "6.10.1", | ||
"react": "17.0.1", | ||
"react-dom": "17.0.1", | ||
"react-i18next": "11.8.15", | ||
"react-query": "3.16.0", | ||
"react-redux": "7.2.4", | ||
"react-redux-toastr": "7.6.5", | ||
"react-router": "5.2.0", | ||
"react-router-dom": "5.2.0", | ||
"react-scripts": "4.0.3", | ||
"redux": "4.1.0", | ||
"redux-devtools-extension": "2.13.9", | ||
"redux-promise": "0.6.0", | ||
"redux-thunk": "2.3.0", | ||
"uuid": "8.3.2" | ||
}, | ||
"scripts": { | ||
"commit-msg": "commitlint --edit $1", | ||
"pre-commit": "pretty-quick --staged && yarn lint", | ||
"post-commit": "git status", | ||
"start": "env-cmd -f ./.env.local react-scripts start", | ||
"start:test": "env-cmd -f ./.env.test react-scripts start", | ||
"start:ci": "react-scripts -r @cypress/instrument-cra start", | ||
"build": "react-scripts build", | ||
"test": "env-cmd -f ./.env.test react-scripts test", | ||
"test:once": "env-cmd -f ./.env.test react-scripts test --watchAll=false", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint .", | ||
"prettier:check": "prettier --check src/**/*.js", | ||
"prettier:write": "prettier --write src/**/*.js", | ||
"hooks:uninstall": "husky uninstall", | ||
"hooks:install": "husky install" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "12.1.1", | ||
"@commitlint/config-conventional": "12.1.1", | ||
"@testing-library/jest-dom": "5.11.6", | ||
"@testing-library/react": "11.2.2", | ||
"@testing-library/user-event": "13.1.8", | ||
"concurrently": "6.1.0", | ||
"env-cmd": "10.1.0", | ||
"enzyme": "3.11.0", | ||
"enzyme-adapter-react-16": "1.15.6", | ||
"eslint-config-airbnb": "18.2.1", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-import": "2.22.1", | ||
"eslint-plugin-jsx-a11y": "6.4.1", | ||
"eslint-plugin-react": "7.23.2", | ||
"husky": "6.0.0", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.3.0", | ||
"pretty-quick": "3.1.0", | ||
"standard-version": "9.3.0", | ||
"typescript": "4.2.4", | ||
"wait-on": "5.3.0" | ||
}, | ||
"nyc": { | ||
"exclude": [ | ||
"src/serviceWorker.js" | ||
] | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta | ||
name="description" | ||
content="Web site created using create-react-app" | ||
/> | ||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> | ||
<!-- | ||
manifest.json provides metadata used when your web app is installed on a | ||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
<!-- | ||
Notice the use of %PUBLIC_URL% in the tags above. | ||
It will be replaced with the URL of the `public` folder during the build. | ||
Only files inside the `public` folder can be referenced from the HTML. | ||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
work correctly both with client-side routing and a non-root public URL. | ||
Learn how to configure a non-root public URL by running `npm run build`. | ||
--> | ||
<title>Graasp</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
You can add webfonts, meta tags, or analytics to this file. | ||
The build step will place the bundled scripts into the <body> tag. | ||
To begin the development, run `npm start` or `yarn start`. | ||
To create a production bundle, use `npm run build` or `yarn build`. | ||
--> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"short_name": "React App", | ||
"name": "Create React App Sample", | ||
"icons": [ | ||
{ | ||
"src": "favicon.ico", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
}, | ||
{ | ||
"src": "logo192.png", | ||
"type": "image/png", | ||
"sizes": "192x192" | ||
}, | ||
{ | ||
"src": "logo512.png", | ||
"type": "image/png", | ||
"sizes": "512x512" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# https://www.robotstxt.org/robotstxt.html | ||
User-agent: * | ||
Disallow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
export EXISTING_VARS=$(printenv | awk -F= '{print $1}' | sed 's/^/\$/g' | paste -sd,); | ||
for file in $JSFOLDER; | ||
do | ||
envsubst $EXISTING_VARS < $file > file.tmp && mv file.tmp $file | ||
done | ||
nginx -g 'daemon off;' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import qs from 'querystring'; | ||
|
||
// eslint-disable-next-line import/prefer-default-export | ||
export function buildSignInPath(to) { | ||
const queryString = qs.stringify({ to }, { addQueryPrefix: true }); | ||
return `signin${queryString}`; | ||
} |
Oops, something went wrong.