better import with alias for paths
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
import Config from "../types/config";
|
||||
import titleIndications from "../utils/title-indications";
|
||||
import type Config from "@typing/config";
|
||||
import titleIndications from "@utils/title-indications";
|
||||
import reply from "./reply";
|
||||
|
||||
type Listener = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Config from "../types/config";
|
||||
import normalizeText from "../utils/normalize-text";
|
||||
import htmlTableToString from "../utils/html-table-to-string";
|
||||
import type Config from "@typing/config";
|
||||
import normalizeText from "@utils/normalize-text";
|
||||
import htmlTableToString from "@utils/html-table-to-string";
|
||||
|
||||
/**
|
||||
* Normalize the question and add sub informations
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Config from "../types/config";
|
||||
import GPTAnswer from "../types/gptAnswer";
|
||||
import normalizeText from "../utils/normalize-text";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
import normalizeText from "@utils/normalize-text";
|
||||
|
||||
/**
|
||||
* Get the response from chatGPT api
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Config from "../../types/config";
|
||||
import GPTAnswer from "../../types/gptAnswer";
|
||||
import titleIndications from "../../utils/title-indications";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
import titleIndications from "@utils/title-indications";
|
||||
|
||||
/**
|
||||
* Copy the response in the clipboard if we can automaticaly fill the question
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Config from "../../types/config";
|
||||
import GPTAnswer from "../../types/gptAnswer";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
|
||||
/**
|
||||
* Hanlde contenteditable elements
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Config from "../../types/config";
|
||||
import GPTAnswer from "../../types/gptAnswer";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
|
||||
/**
|
||||
* Handle number input
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Config from "../../types/config";
|
||||
import GPTAnswer from "../../types/gptAnswer";
|
||||
import Logs from "../../utils/logs";
|
||||
import normalizeText from "../../utils/normalize-text";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
import Logs from "@utils/logs";
|
||||
import normalizeText from "@utils/normalize-text";
|
||||
|
||||
/**
|
||||
* Handle checkbox and input elements
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Config from "../../types/config";
|
||||
import GPTAnswer from "../../types/gptAnswer";
|
||||
import Logs from "../../utils/logs";
|
||||
import normalizeText from "../../utils/normalize-text";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
import Logs from "@utils/logs";
|
||||
import normalizeText from "@utils/normalize-text";
|
||||
|
||||
/**
|
||||
* Handle select elements (and put in order select)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Config from "../../types/config";
|
||||
import GPTAnswer from "../../types/gptAnswer";
|
||||
import type Config from "@typing/config";
|
||||
import type GPTAnswer from "@typing/gptAnswer";
|
||||
|
||||
/**
|
||||
* Handle textbox
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import Config from "../types/config";
|
||||
import Logs from "../utils/logs";
|
||||
import type Config from "@typing/config";
|
||||
import Logs from "@utils/logs";
|
||||
import getChatGPTResponse from "./get-response";
|
||||
import createQuestion from "./create-question";
|
||||
import handleRadioAndCheckbox from "./questions/radio-checkbox";
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import type Config from "@typing/config";
|
||||
import { codeListener, setUpMoodleGpt } from "./core/code-listener";
|
||||
import type Config from "./types/config";
|
||||
|
||||
chrome.storage.sync.get(["moodleGPT"]).then(function (storage) {
|
||||
const config: Config = storage.moodleGPT;
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
import GPTAnswer from "../types/gptAnswer";
|
||||
import GPTAnswer from "@typing/gptAnswer";
|
||||
|
||||
class Logs {
|
||||
static question(text: string) {
|
||||
const css = "color: cyan";
|
||||
|
||||
+9
-2
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"module": "CommonJS",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
@@ -10,7 +11,13 @@
|
||||
"outDir": "extension",
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node", "chrome"],
|
||||
"typeRoots": ["node_modules/@types"]
|
||||
"typeRoots": ["node_modules/@types"],
|
||||
"paths": {
|
||||
"@typing/*": ["types/*"],
|
||||
"@utils/*": ["utils/*"],
|
||||
"@core/*": ["core/*"],
|
||||
"@questions/*": ["core/question/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
"include": ["**/*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user