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 type Config from "@typing/config";
|
||||||
import titleIndications from "../utils/title-indications";
|
import titleIndications from "@utils/title-indications";
|
||||||
import reply from "./reply";
|
import reply from "./reply";
|
||||||
|
|
||||||
type Listener = {
|
type Listener = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Config from "../types/config";
|
import type Config from "@typing/config";
|
||||||
import normalizeText from "../utils/normalize-text";
|
import normalizeText from "@utils/normalize-text";
|
||||||
import htmlTableToString from "../utils/html-table-to-string";
|
import htmlTableToString from "@utils/html-table-to-string";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize the question and add sub informations
|
* Normalize the question and add sub informations
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Config from "../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
import normalizeText from "../utils/normalize-text";
|
import normalizeText from "@utils/normalize-text";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the response from chatGPT api
|
* Get the response from chatGPT api
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Config from "../../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
import titleIndications from "../../utils/title-indications";
|
import titleIndications from "@utils/title-indications";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copy the response in the clipboard if we can automaticaly fill the question
|
* Copy the response in the clipboard if we can automaticaly fill the question
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Config from "../../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hanlde contenteditable elements
|
* Hanlde contenteditable elements
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Config from "../../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle number input
|
* Handle number input
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Config from "../../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
import Logs from "../../utils/logs";
|
import Logs from "@utils/logs";
|
||||||
import normalizeText from "../../utils/normalize-text";
|
import normalizeText from "@utils/normalize-text";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle checkbox and input elements
|
* Handle checkbox and input elements
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Config from "../../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
import Logs from "../../utils/logs";
|
import Logs from "@utils/logs";
|
||||||
import normalizeText from "../../utils/normalize-text";
|
import normalizeText from "@utils/normalize-text";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle select elements (and put in order select)
|
* Handle select elements (and put in order select)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Config from "../../types/config";
|
import type Config from "@typing/config";
|
||||||
import GPTAnswer from "../../types/gptAnswer";
|
import type GPTAnswer from "@typing/gptAnswer";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle textbox
|
* Handle textbox
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import Config from "../types/config";
|
import type Config from "@typing/config";
|
||||||
import Logs from "../utils/logs";
|
import Logs from "@utils/logs";
|
||||||
import getChatGPTResponse from "./get-response";
|
import getChatGPTResponse from "./get-response";
|
||||||
import createQuestion from "./create-question";
|
import createQuestion from "./create-question";
|
||||||
import handleRadioAndCheckbox from "./questions/radio-checkbox";
|
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 { codeListener, setUpMoodleGpt } from "./core/code-listener";
|
||||||
import type Config from "./types/config";
|
|
||||||
|
|
||||||
chrome.storage.sync.get(["moodleGPT"]).then(function (storage) {
|
chrome.storage.sync.get(["moodleGPT"]).then(function (storage) {
|
||||||
const config: Config = storage.moodleGPT;
|
const config: Config = storage.moodleGPT;
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,5 @@
|
|||||||
import GPTAnswer from "../types/gptAnswer";
|
import GPTAnswer from "@typing/gptAnswer";
|
||||||
|
|
||||||
class Logs {
|
class Logs {
|
||||||
static question(text: string) {
|
static question(text: string) {
|
||||||
const css = "color: cyan";
|
const css = "color: cyan";
|
||||||
|
|||||||
+9
-2
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"baseUrl": "src",
|
||||||
"module": "CommonJS",
|
"module": "CommonJS",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
@@ -10,7 +11,13 @@
|
|||||||
"outDir": "extension",
|
"outDir": "extension",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"types": ["node", "chrome"],
|
"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