From ff89670e6c6e54018cc18b12ccf795eb88c393ae Mon Sep 17 00:00:00 2001 From: JRK Date: Fri, 18 Feb 2022 12:08:37 +0100 Subject: [PATCH] relative dir --- package.json | 2 +- src/lib/controller/Pipedrive/ReachCounter/ReachCounter.ts | 5 +++-- src/lib/core/controller/TamperController.ts | 2 +- src/lib/core/router/TamperRouter.ts | 7 ++++--- src/lib/index.ts | 2 +- tsconfig.json | 6 ++++++ 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b239484..ea6c297 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@santeacademie/bigbrowser", - "version": "2.5", + "version": "2.6", "description": "Better browser for your own good", "main": "build/index.js", "types": "build/types/index.d.ts", diff --git a/src/lib/controller/Pipedrive/ReachCounter/ReachCounter.ts b/src/lib/controller/Pipedrive/ReachCounter/ReachCounter.ts index 9bfb453..12a90ed 100644 --- a/src/lib/controller/Pipedrive/ReachCounter/ReachCounter.ts +++ b/src/lib/controller/Pipedrive/ReachCounter/ReachCounter.ts @@ -1,7 +1,8 @@ -import TamperController from '../../../core/controller/TamperController'; -import TamperRequest from '../../../core/router/TamperRequest'; import $ from 'jquery'; +import TamperController from '@core/controller/TamperController'; +import TamperRequest from '@core/router/TamperRequest'; + class ReachCounter extends TamperController { loaded = false; hashTryReachField = 'a9a1a17c4397010006c2aa550dca0cab13ed3419'; diff --git a/src/lib/core/controller/TamperController.ts b/src/lib/core/controller/TamperController.ts index ef59de6..e6e71da 100644 --- a/src/lib/core/controller/TamperController.ts +++ b/src/lib/core/controller/TamperController.ts @@ -1,4 +1,4 @@ -import TamperRequest from '../router/TamperRequest'; +import TamperRequest from '@core/router/TamperRequest'; abstract class TamperController { constructor() {} diff --git a/src/lib/core/router/TamperRouter.ts b/src/lib/core/router/TamperRouter.ts index 1528c80..d01dff0 100644 --- a/src/lib/core/router/TamperRouter.ts +++ b/src/lib/core/router/TamperRouter.ts @@ -1,7 +1,8 @@ -import routes from '../../config/routes.json'; -import TamperController from '../controller/TamperController'; import {Router, Result} from 'uri-template-router'; -import TamperRequest from './TamperRequest'; + +import routes from '@config/routes.json'; +import TamperController from '@core/controller/TamperController'; +import TamperRequest from '@core/router/TamperRequest'; type TamperControllers = { [key: string]: TamperController; diff --git a/src/lib/index.ts b/src/lib/index.ts index fca29e7..f964615 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,4 +1,4 @@ -import TamperRouter from './core/router/TamperRouter'; +import TamperRouter from '@core/router/TamperRouter'; class App { router: TamperRouter; diff --git a/tsconfig.json b/tsconfig.json index ca128dc..9dddf51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,12 @@ "declaration": true, "emitDeclarationOnly": true, "suppressImplicitAnyIndexErrors": true, + "baseUrl": "src/lib", + "paths": { + "@config/*": ["config/*"], + "@controller/*": ["controller/*"], + "@core/*": ["core/*"] + }, "lib": [ "es2018", "dom"