@gracile/internal-utils
Advanced tools
Comparing version 0.3.1 to 0.4.0-next.0
@@ -1,2 +0,2 @@ | ||
export declare const logger: import("vite").Logger; | ||
export declare function createGracileViteLogger(): import("vite").Logger; | ||
//# sourceMappingURL=vite-logger.d.ts.map |
import { createLogger } from 'vite'; | ||
export const logger = createLogger(undefined, { prefix: '[gracile]' }); | ||
import { loggerSymbol } from './logger.js'; | ||
export function createGracileViteLogger() { | ||
const logger = createLogger(undefined, { prefix: '[gracile]' }); | ||
// @ts-expect-error ............... | ||
globalThis[loggerSymbol] = logger; | ||
return logger; | ||
} |
export declare function removeAllExt(p: string): string; | ||
export declare function isWindows(): boolean; | ||
export declare const WINDOWS_PATH_SEPARATOR = "\\"; | ||
export declare function normalizeToPosix(input: string): string; | ||
export declare function removeLeadingForwardSlashWindows(path: string): string; | ||
//# sourceMappingURL=paths.d.ts.map |
export function removeAllExt(p) { | ||
return p.replace(/\.(.*)$/, ''); | ||
} | ||
export function isWindows() { | ||
if ('process' in globalThis && 'platform' in globalThis.process) | ||
if (process.platform === 'win32') | ||
return true; | ||
else | ||
return false; | ||
throw new Error(`Are you in a Node environment?`); | ||
} | ||
export const WINDOWS_PATH_SEPARATOR = '\\'; | ||
export function normalizeToPosix(input) { | ||
if (isWindows()) | ||
return input.replaceAll(WINDOWS_PATH_SEPARATOR, '/'); | ||
return input; | ||
} | ||
export function removeLeadingForwardSlashWindows(path) { | ||
return path.startsWith('/') && path[2] === ':' ? path.substring(1) : path; | ||
} |
{ | ||
"name": "@gracile/internal-utils", | ||
"version": "0.3.1", | ||
"version": "0.4.0-next.0", | ||
"description": "A thin, full-stack, web framework", | ||
@@ -31,9 +31,2 @@ "keywords": [ | ||
"./*": "./dist/*.js", | ||
"./logger": { | ||
"development": "./dist/logger/logger.dev.js", | ||
"production": "./dist/logger/logger.build.js", | ||
"test": "./dist/logger/logger.dev.js", | ||
"preview": "./dist/logger/logger.dev.js", | ||
"default": "./dist/logger/logger.build.js" | ||
}, | ||
"./env": { | ||
@@ -56,3 +49,5 @@ "types": "./dist/env/index.d.ts", | ||
"files": [ | ||
"./dist/**/*" | ||
"./dist/**/*", | ||
"!/dist/**/*.test.*", | ||
"!/dist/typedoc-entrypoint.*" | ||
], | ||
@@ -66,3 +61,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "970e457d0382b48beb531a1803393373cae38dcb" | ||
"gitHead": "eb666d5de119a919c30846412cf3c5301200f9bd" | ||
} |
Sorry, the diff of this file is not supported yet
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
62194
52
464