ruoyi-plus-soybean/build/utils/index.ts

21 lines
402 B
TypeScript
Raw Normal View History

import path from 'path';
/**
*
* @descrition
*/
export function getRootPath() {
return path.resolve(process.cwd());
}
/**
* src路径
* @param srcName - src目录名称(: "src")
* @descrition
*/
export function getSrcPath(srcName = 'src') {
const rootPath = getRootPath();
return `${rootPath}/${srcName}`;
}