mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
chore: hide generated logs
This commit is contained in:
parent
0675191cba
commit
cc4a32c024
@ -44,10 +44,12 @@ export function tryImport (dir: string, path: string) {
|
|||||||
} catch (_err) { }
|
} catch (_err) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function writeFile (file, contents) {
|
export async function writeFile (file, contents, log = false) {
|
||||||
await fse.mkdirp(dirname(file))
|
await fse.mkdirp(dirname(file))
|
||||||
await fse.writeFile(file, contents, 'utf-8')
|
await fse.writeFile(file, contents, 'utf-8')
|
||||||
|
if (log) {
|
||||||
consola.info('Generated', prettyPath(file))
|
consola.info('Generated', prettyPath(file))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function resolvePath (sigmaContext: SigmaInput, path: string | ((sigmaContext) => string), resolveBase: string = ''): string {
|
export function resolvePath (sigmaContext: SigmaInput, path: string | ((sigmaContext) => string), resolveBase: string = ''): string {
|
||||||
|
Loading…
Reference in New Issue
Block a user