(prefix: string)
| 22 | } |
| 23 | |
| 24 | export function createLogger(prefix: string) { |
| 25 | const label = `[${prefix}]` |
| 26 | return { |
| 27 | log: (...args: any) => console.log(label, ...args), |
| 28 | debug: (...args: any) => console.debug(label, ...args), |
| 29 | info: (...args: any) => console.info(label, ...args), |
| 30 | warn: (...args: any) => console.warn(label, ...args), |
| 31 | error: (...args: any) => console.error(label, ...args), |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | function slash(path: string): string { |
| 36 | return path.replace(windowsSlashRE, '/') |