chore: added import aliases
This commit is contained in:
parent
b9ac8a1709
commit
a1eb102850
7 changed files with 64 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn lint-staged
|
||||
yarn lint-staged
|
||||
yarn test
|
|
@ -27,7 +27,7 @@
|
|||
"release:full": "standard-version -s",
|
||||
"run:dev": "node dist/src/index.js --dev",
|
||||
"run:prod": "node dist/index.js",
|
||||
"test": "mocha -r ts-node/register tests/**/*.test.ts",
|
||||
"test": "mocha -r ts-node/register -r tsconfig-paths/register tests/**/*.test.ts",
|
||||
"watch:bot": "nodemon dist/src/index.js --dev",
|
||||
"watch:rollup": "tsc --watch",
|
||||
"watch:tsc": "tsc --watch"
|
||||
|
@ -91,6 +91,7 @@
|
|||
"sinon": "^11.1.1",
|
||||
"standard-version": "^9.3.0",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsconfig-paths": "^3.9.0",
|
||||
"typescript": "^4.3.3",
|
||||
"typescript-eslint-language-service": "^4.1.4"
|
||||
},
|
||||
|
@ -181,5 +182,11 @@
|
|||
"section": "Bug Fixes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"_moduleAliases": {
|
||||
"@": "dist",
|
||||
"@src": "dist/src",
|
||||
"@lib": "dist/src/lib",
|
||||
"@utils": "dist/src/lib/utils/"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,11 +14,13 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>.
|
||||
*/
|
||||
require('module-alias/register');
|
||||
|
||||
import { Client } from 'discord.js';
|
||||
import figlet from 'figlet';
|
||||
import gradient from 'gradient-string';
|
||||
import { debug, error, info } from './lib/utils/logger';
|
||||
import { ELoggingScope } from './lib/utils/types';
|
||||
import { debug, error, info } from '@utils/logger';
|
||||
import { ELoggingScope } from '@utils/types';
|
||||
//import { token } from '../config.json';
|
||||
|
||||
debug('Starting bot... Please wait!', ELoggingScope.Startup);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
import chalk from 'chalk';
|
||||
import { DateTime } from 'luxon';
|
||||
import { loglevel } from '../../../config.json';
|
||||
import { loglevel } from '@/config.json';
|
||||
|
||||
import type { ELoggingScope } from './types';
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
import { describe, it, beforeEach, afterEach } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { verbose, debug, info, warn, error, fatal } from '../../src/lib/utils/logger';
|
||||
import { ELoggingScope } from '../../src/lib/utils/types';
|
||||
import { verbose, debug, info, warn, error, fatal } from '@utils/logger';
|
||||
import { ELoggingScope } from '@utils/types';
|
||||
|
||||
describe('verbose()', () => {
|
||||
let spy: sinon.SinonStub<[message?: any, ...optionalParams: any[]], void>;
|
||||
|
|
|
@ -47,11 +47,26 @@
|
|||
"preserveConstEnums": true,
|
||||
"resolveJsonModule": true,
|
||||
"traceResolution": false,
|
||||
"baseUrl": ".",
|
||||
"plugins": [
|
||||
{
|
||||
"name": "typescript-eslint-language-service"
|
||||
}
|
||||
]
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"*"
|
||||
],
|
||||
"@/src": [
|
||||
"src/*"
|
||||
],
|
||||
"@lib/*": [
|
||||
"src/lib/*"
|
||||
],
|
||||
"@utils/*": [
|
||||
"src/lib/utils/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"watchOptions": {
|
||||
"watchFile": "useFsEvents",
|
||||
|
|
31
yarn.lock
31
yarn.lock
|
@ -866,6 +866,13 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/json5@npm:^0.0.29":
|
||||
version: 0.0.29
|
||||
resolution: "@types/json5@npm:0.0.29"
|
||||
checksum: e60b153664572116dfea673c5bda7778dbff150498f44f998e34b5886d8afc47f16799280e4b6e241c0472aef1bc36add771c569c68fc5125fc2ae519a3eb9ac
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/keyv@npm:*, @types/keyv@npm:^3.1.1":
|
||||
version: 3.1.1
|
||||
resolution: "@types/keyv@npm:3.1.1"
|
||||
|
@ -1577,6 +1584,7 @@ __metadata:
|
|||
standard-version: ^9.3.0
|
||||
terminal-link: ^3.0.0
|
||||
ts-node: ^10.0.0
|
||||
tsconfig-paths: ^3.9.0
|
||||
tslib: ^2.3.0
|
||||
typescript: ^4.3.3
|
||||
typescript-eslint-language-service: ^4.1.4
|
||||
|
@ -4595,6 +4603,17 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json5@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "json5@npm:1.0.1"
|
||||
dependencies:
|
||||
minimist: ^1.2.0
|
||||
bin:
|
||||
json5: lib/cli.js
|
||||
checksum: e76ea23dbb8fc1348c143da628134a98adf4c5a4e8ea2adaa74a80c455fc2cdf0e2e13e6398ef819bfe92306b610ebb2002668ed9fc1af386d593691ef346fc3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json5@npm:^2.1.1, json5@npm:^2.1.2":
|
||||
version: 2.2.0
|
||||
resolution: "json5@npm:2.2.0"
|
||||
|
@ -7463,6 +7482,18 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tsconfig-paths@npm:^3.9.0":
|
||||
version: 3.9.0
|
||||
resolution: "tsconfig-paths@npm:3.9.0"
|
||||
dependencies:
|
||||
"@types/json5": ^0.0.29
|
||||
json5: ^1.0.1
|
||||
minimist: ^1.2.0
|
||||
strip-bom: ^3.0.0
|
||||
checksum: 243b3b098c76a4ca90ea0431683f3755a4ff175c6123bcba5f7b4bd80fe2ef8fa9bdc8f4d525148a1e71ade7f3e037e7c0313ae177fd12398ab68f05c2c7f25d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tslib@npm:^1.13.0, tslib@npm:^1.8.1, tslib@npm:^1.9.0":
|
||||
version: 1.14.1
|
||||
resolution: "tslib@npm:1.14.1"
|
||||
|
|
Reference in a new issue