chore: 整理 third-party Dark Reader 目录并移除本地说明文件跟踪
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
import {createRequire} from 'node:module';
|
||||
import {dirname, join} from 'node:path';
|
||||
|
||||
let rootDir = dirname(createRequire(import.meta.url).resolve('../package.json'));
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @returns {string}
|
||||
*/
|
||||
export const absolutePath = (path) => {
|
||||
return join(rootDir, path);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} dir
|
||||
*/
|
||||
export function setRootDir(dir) {
|
||||
rootDir = dir;
|
||||
}
|
||||
|
||||
export function getDestDir({debug, platform}) {
|
||||
const buildTypeDir = `build/${debug ? 'debug' : 'release'}`;
|
||||
return `${buildTypeDir}/${platform}`;
|
||||
}
|
||||
|
||||
export default {
|
||||
getDestDir,
|
||||
rootDir,
|
||||
absolutePath,
|
||||
setRootDir,
|
||||
};
|
||||
Reference in New Issue
Block a user