mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
Apply review comments
This commit is contained in:
parent
849177562d
commit
32444fac90
@ -170,9 +170,9 @@ function createGraph(container, data, activeUserId) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef FamilyGraphConfig
|
* @typedef FamilyGraphConfig
|
||||||
* @param {number} activeUser Id of the user to fetch the tree from
|
* @property {number} activeUser Id of the user to fetch the tree from
|
||||||
* @param {number} depthMin Minimum tree depth for godfathers and godchildren
|
* @property {number} depthMin Minimum tree depth for godfathers and godchildren
|
||||||
* @param {number} depthMax Maximum tree depth for godfathers and godchildren
|
* @property {number} depthMax Maximum tree depth for godfathers and godchildren
|
||||||
**/
|
**/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +30,7 @@ import { picturesFetchPictures } from "#openapi";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef PicturePageConfig
|
* @typedef PicturePageConfig
|
||||||
* @param {number} userId Id of the user to get the pictures from
|
* @property {number} userId Id of the user to get the pictures from
|
||||||
**/
|
**/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,12 +8,12 @@ D'abord, il faut ajouter dans node via `package.json`:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
// ...
|
// ...
|
||||||
"imports": {
|
"imports": {
|
||||||
// ...
|
// ...
|
||||||
"#mon_app:*": "./mon_app/static/webpack/*"
|
"#mon_app:*": "./mon_app/static/webpack/*"
|
||||||
}
|
}
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -21,13 +21,13 @@ Ensuite, pour faire fonctionne l'auto-complétion, il faut configurer `tsconfig.
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// ...
|
// ...
|
||||||
"paths": {
|
"paths": {
|
||||||
// ...
|
// ...
|
||||||
"#mon_app:*": ["./mon_app/static/webpack/*"]
|
"#mon_app:*": ["./mon_app/static/webpack/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ Pour accéder au fichier, il faut utiliser `static` comme pour le reste mais en
|
|||||||
|
|
||||||
### Les imports au sein des fichiers de webpack
|
### Les imports au sein des fichiers de webpack
|
||||||
|
|
||||||
Pour importer au sein de webpack, faut préfixer ses imports de `#app:`.
|
Pour importer au sein de webpack, il faut préfixer ses imports de `#app:`.
|
||||||
|
|
||||||
Example:
|
Exemple:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { paginated } from "#core:utils/api";
|
import { paginated } from "#core:utils/api";
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
// biome-ignore lint/correctness/noNodejsModules: this only used at compile time
|
// biome-ignore lint/correctness/noNodejsModules: this only used at compile time
|
||||||
const path = require("node:path");
|
import { resolve } from "node:path";
|
||||||
import { defineConfig } from "@hey-api/openapi-ts";
|
import { defineConfig } from "@hey-api/openapi-ts";
|
||||||
|
|
||||||
// biome-ignore lint/style/noDefaultExport: needed for openapi-ts
|
// biome-ignore lint/style/noDefaultExport: needed for openapi-ts
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
client: "@hey-api/client-fetch",
|
client: "@hey-api/client-fetch",
|
||||||
input: path.resolve(__dirname, "./staticfiles/generated/openapi/schema.json"),
|
input: resolve(__dirname, "./staticfiles/generated/openapi/schema.json"),
|
||||||
output: path.resolve(__dirname, "./staticfiles/generated/openapi"),
|
output: resolve(__dirname, "./staticfiles/generated/openapi"),
|
||||||
});
|
});
|
||||||
|
@ -81,10 +81,10 @@ class PictureWithIdentifications {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef ViewerConfig
|
* @typedef ViewerConfig
|
||||||
* @param {number} userId Id of the user to get the pictures from
|
* @property {number} userId Id of the user to get the pictures from
|
||||||
* @param {number} albumId Id of the album to displlay
|
* @property {number} albumId Id of the album to displlay
|
||||||
* @param {number} firstPictureId id of the first picture to load on the page
|
* @property {number} firstPictureId id of the first picture to load on the page
|
||||||
* @param {bool} userIsSasAdmin if the user is sas admin
|
* @property {bool} userIsSasAdmin if the user is sas admin
|
||||||
**/
|
**/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@ class ManifestPostProcessingStorage(ManifestStaticFilesStorage):
|
|||||||
)
|
)
|
||||||
name = str(path.with_suffix(".css"))
|
name = str(path.with_suffix(".css"))
|
||||||
|
|
||||||
if path.suffix == ".ts":
|
elif path.suffix == ".ts":
|
||||||
name = str(path.with_suffix(".js"))
|
name = str(path.with_suffix(".js"))
|
||||||
|
|
||||||
return super().url(name, force=force)
|
return super().url(name, force=force)
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"module": "es6",
|
"module": "es6",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"jsx": "react",
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
@ -23,7 +23,7 @@ module.exports = {
|
|||||||
return obj;
|
return obj;
|
||||||
}, {}),
|
}, {}),
|
||||||
cache: {
|
cache: {
|
||||||
type: "filesystem", // This reduces typescript compilation time like crazy
|
type: "filesystem", // This reduces typescript compilation time like crazy when you restart the server
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: "[name].js",
|
filename: "[name].js",
|
||||||
|
Loading…
Reference in New Issue
Block a user