@gracile/internal-utils
Advanced tools
Comparing version 0.1.0 to 0.2.0-next.0
@@ -1,10 +0,2 @@ | ||
export declare function setCurrentWorkingDirectory(root?: string | undefined): string; | ||
export declare function user(p: string | string[]): string; | ||
export declare function relativeToProject(p: string): string; | ||
export declare function removeJsTsExt(p: string): string; | ||
export declare function removeAllExt(p: string): string; | ||
export declare function removeLastExt(p: string): string; | ||
export declare function relativeToProjectNoJsTs(p: string): string; | ||
export declare function relativeToAbsoluteProject(p: string): string; | ||
export declare function tsToJs(p: string): string; | ||
//# sourceMappingURL=paths.d.ts.map |
@@ -1,35 +0,3 @@ | ||
import path from 'node:path'; | ||
let cwd = process.env['__GRACILE_PROJECT_CWD'] || process.cwd(); | ||
export function setCurrentWorkingDirectory(root) { | ||
if (root && root !== cwd) { | ||
cwd = root; | ||
} | ||
process.env['__GRACILE_PROJECT_CWD'] = cwd; | ||
return cwd; | ||
} | ||
export function user(p) { | ||
if (typeof p === 'string') | ||
return path.join(cwd, p); | ||
return path.join(cwd, ...p); | ||
} | ||
export function relativeToProject(p) { | ||
return path.relative(cwd, p); | ||
} | ||
export function removeJsTsExt(p) { | ||
return p.replace(/\.(js|ts)$/, ''); | ||
} | ||
export function removeAllExt(p) { | ||
return p.replace(/\.(.*)$/, ''); | ||
} | ||
export function removeLastExt(p) { | ||
return p.split('.').slice(0, -1).join('.'); | ||
} | ||
export function relativeToProjectNoJsTs(p) { | ||
return removeJsTsExt(relativeToProject(p)); | ||
} | ||
export function relativeToAbsoluteProject(p) { | ||
return path.join(cwd, p); | ||
} | ||
export function tsToJs(p) { | ||
return p.replace(/\.ts$/, '.js'); | ||
} |
{ | ||
"name": "@gracile/internal-utils", | ||
"version": "0.1.0", | ||
"version": "0.2.0-next.0", | ||
"description": "A thin, full-stack, web framework", | ||
"keywords": [ | ||
"custom-elements", | ||
"full-stack", | ||
"lit", | ||
"meta-framework", | ||
"custom-elements", | ||
"ssr", | ||
"server", | ||
"server-side-rendering", | ||
"ssr", | ||
"static", | ||
"web-components", | ||
"lit" | ||
"web-components" | ||
], | ||
@@ -33,5 +33,5 @@ "homepage": "https://gracile.js.org", | ||
"development": "./dist/logger.dev.js", | ||
"default": "./dist/logger.build.js", | ||
"test": "./dist/logger.dev.js", | ||
"preview": "./dist/logger.preview.js", | ||
"default": "./dist/logger.build.js" | ||
"preview": "./dist/logger.preview.js" | ||
} | ||
@@ -43,3 +43,3 @@ }, | ||
"peerDependencies": { | ||
"vite": "5.x" | ||
"vite": "^5.3.5" | ||
}, | ||
@@ -50,3 +50,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "0144feb42555df6bc0fb46160c2ee0a446d784d5" | ||
"gitHead": "0c9fd7b54c25d4eb7188f0dfa782d31214f41407" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
0
44985
19
200