Skip to content

Commit

Permalink
pull master into Feature_Mediatheque_VIL97
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-pages committed May 22, 2024
2 parents 1c942a8 + 53940c9 commit 8e74281
Show file tree
Hide file tree
Showing 72 changed files with 1,505 additions and 411 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ test.html
docker-compose.build.yml
docker-compose.bdd.yml

*.http
*.http

.husky/
190 changes: 190 additions & 0 deletions .pnp.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"prettier.configPath": ".prettierrc.js",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.formatOnSave": true,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});
config.resolve.alias.canvas = false;
return config;
},
experimental: { esmExternals: false },
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"migration:run": "yarn typeorm migration:run -d dist/server/utils/data-source.js",
"migration:run-dev": "rm -rf dist && yarn build:server && yarn typeorm migration:run -d dist/server/utils/data-source.js || true",
"migration:revert-dev": "rm -rf dist && yarn build:server && npx typeorm migration:revert -d dist/server/utils/data-source.js || true",
"typeorm": "typeorm-ts-node-commonjs"
"typeorm": "typeorm-ts-node-commonjs",
"prepare": "husky"
},
"jest": {
"testEnvironment": "node",
Expand Down Expand Up @@ -55,6 +56,7 @@
},
"devDependencies": {
"@next/eslint-plugin-next": "^12.1.6",
"@react-pdf/types": "^2.5.0",
"@svgr/webpack": "6.2.1",
"@swc/cli": "^0.1.57",
"@swc/core": "1.2.205",
Expand Down Expand Up @@ -109,6 +111,7 @@
"eslint-plugin-react": "7.30.1",
"eslint-plugin-react-hooks": "4.6.0",
"geojson": "0.5.0",
"husky": "^9.0.11",
"jest": "28.1.1",
"nodemon": "2.0.18",
"prettier": "2.7.1",
Expand Down Expand Up @@ -177,6 +180,7 @@
"query-string": "^7.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-pdf": "^8.0.0",
"react-player": "^2.10.1",
"react-query": "^3.39.2",
"resize-observer-polyfill": "^1.5.1",
Expand Down
25 changes: 25 additions & 0 deletions prepareHusky.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* eslint-disable no-console */
import fs from 'fs';

function checkHuskyFolder() {
const pathHuskyDir = './.husky';
const huskyFolderExists = fs.existsSync(pathHuskyDir);
if (!huskyFolderExists) {
// eslint-disable-next-line no-undef
const msg = 'You must run the following command first command\n- npx husky init && node ./prepareHusky.mjs';
// console.log('Husky pre-push setup created!!');
throw msg;
} else {
fs.unlink(pathHuskyDir + '/pre-commit', (err) => {
// eslint-disable-next-line no-undef
if (err) console.log('No pre-commit file found');
});
fs.writeFile(`${pathHuskyDir}/pre-push`, 'yarn build', { ovewrite: true }, function (err) {
if (err) throw err;
// eslint-disable-next-line no-undef
console.log('Husky setup Ok!');
});
}
}

checkHuskyFolder();
Loading

0 comments on commit 8e74281

Please sign in to comment.