Website Structure
This commit is contained in:
parent
62812f2090
commit
71f0676a62
22365 changed files with 4265753 additions and 791 deletions
28
Frontend-Learner/node_modules/@nuxt/devtools/dist/dirs.mjs
generated
vendored
Normal file
28
Frontend-Learner/node_modules/@nuxt/devtools/dist/dirs.mjs
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import isInstalledGlobally from 'is-installed-globally';
|
||||
|
||||
const packageDir = resolve(fileURLToPath(import.meta.url), "../..");
|
||||
const distDir = resolve(fileURLToPath(import.meta.url), "..");
|
||||
const runtimeDir = resolve(distDir, "runtime");
|
||||
const clientDir = resolve(distDir, "client");
|
||||
const globalInstallMatch = [
|
||||
"/yarn/global/",
|
||||
"/pnpm/global/",
|
||||
"/npm/global/",
|
||||
"/.nvm/",
|
||||
"/.volta/",
|
||||
"/.fnm/",
|
||||
// On Windows
|
||||
"/nvm/versions/",
|
||||
"/n/versions/"
|
||||
// TODO: More info for other package managers
|
||||
];
|
||||
function isGlobalInstall() {
|
||||
if (isInstalledGlobally === true || isInstalledGlobally.default === true)
|
||||
return true;
|
||||
const dir = packageDir.replace(/\\/g, "/");
|
||||
return globalInstallMatch.some((i) => dir.includes(i));
|
||||
}
|
||||
|
||||
export { clientDir, distDir, isGlobalInstall, packageDir, runtimeDir };
|
||||
Loading…
Add table
Add a link
Reference in a new issue