mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
chore: 添加 resolve alias (#2131)
* chore: add resolve alias "@" to "./lib" * chore: fix jest moduleNameMapper * fix: 修复 yarn.lock 文件
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
|
require('module-alias/register');
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
const Koa = require('koa');
|
const Koa = require('koa');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const axios = require('../../utils/axios');
|
const axios = require('@/utils/axios');
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
const host = 'https://www.hpoi.net';
|
const host = 'https://www.hpoi.net';
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
"luxon": "1.13.2",
|
"luxon": "1.13.2",
|
||||||
"lz-string": "1.4.4",
|
"lz-string": "1.4.4",
|
||||||
"markdown-it": "8.4.2",
|
"markdown-it": "8.4.2",
|
||||||
|
"module-alias": "^2.2.0",
|
||||||
"node-fetch": "2.5.0",
|
"node-fetch": "2.5.0",
|
||||||
"path-to-regexp": "3.0.0",
|
"path-to-regexp": "3.0.0",
|
||||||
"pidusage": "2.0.17",
|
"pidusage": "2.0.17",
|
||||||
@@ -109,6 +110,12 @@
|
|||||||
"!lib/routes/**/*.js"
|
"!lib/routes/**/*.js"
|
||||||
],
|
],
|
||||||
"bail": true,
|
"bail": true,
|
||||||
"testEnvironment": "node"
|
"testEnvironment": "node",
|
||||||
|
"moduleNameMapper": {
|
||||||
|
"@/(.*)": "<rootDir>/lib/$1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_moduleAliases": {
|
||||||
|
"@": "./lib"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6658,6 +6658,11 @@ mockdate@2.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-2.0.2.tgz#5ae0c0eaf8fe23e009cd01f9889b42c4f634af12"
|
resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-2.0.2.tgz#5ae0c0eaf8fe23e009cd01f9889b42c4f634af12"
|
||||||
integrity sha1-WuDA6vj+I+AJzQH5iJtCxPY0rxI=
|
integrity sha1-WuDA6vj+I+AJzQH5iJtCxPY0rxI=
|
||||||
|
|
||||||
|
module-alias@^2.2.0:
|
||||||
|
version "2.2.0"
|
||||||
|
resolved "https://registry.npm.taobao.org/module-alias/download/module-alias-2.2.0.tgz#a2e32275381642252bf0c51405f7a09a367479b5"
|
||||||
|
integrity sha1-ouMidTgWQiUr8MUUBfegmjZ0ebU=
|
||||||
|
|
||||||
move-concurrently@^1.0.1:
|
move-concurrently@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
||||||
|
|||||||
Reference in New Issue
Block a user