diff --git a/packages/nuxt3/src/builder/builder.ts b/packages/nuxt3/src/builder/builder.ts index a88f57a54a..5f74eb5f4a 100644 --- a/packages/nuxt3/src/builder/builder.ts +++ b/packages/nuxt3/src/builder/builder.ts @@ -21,7 +21,7 @@ export class Builder { } // Extends VueRouter -async function build(builder: Builder) { +async function build (builder: Builder) { const { nuxt } = builder await generate(builder) @@ -33,7 +33,7 @@ async function build(builder: Builder) { await bundle(builder) } -function watch(builder: Builder) { +function watch (builder: Builder) { const { nuxt } = builder // Watch internal templates @@ -52,7 +52,7 @@ function watch(builder: Builder) { }) // appWatcher.debug() appWatcher.watch(/(A|a)pp\.[a-z]{2,3}/, async () => { - await new Promise((resolve) => setTimeout(resolve, 200)) + await new Promise(resolve => setTimeout(resolve, 200)) await generate(builder) }) appWatcher.watch('pages/', async () => { @@ -61,7 +61,7 @@ function watch(builder: Builder) { }) } -export async function generate(builder: Builder) { +export async function generate (builder: Builder) { const { nuxt } = builder await fsExtra.mkdirp(nuxt.options.buildDir) diff --git a/packages/nuxt3/src/builder/template.ts b/packages/nuxt3/src/builder/template.ts index d03b29795c..dc3a9b4473 100644 --- a/packages/nuxt3/src/builder/template.ts +++ b/packages/nuxt3/src/builder/template.ts @@ -9,7 +9,7 @@ interface NuxtTemplate { data?: any } -async function compileTemplate({ src, path, data }: NuxtTemplate, destDir: string) { +async function compileTemplate ({ src, path, data }: NuxtTemplate, destDir: string) { const srcContents = await fsExtra.readFile(src, 'utf-8') const compiledSrc = lodashTemplate(srcContents, {})(data) const dest = join(destDir, path) @@ -18,7 +18,7 @@ async function compileTemplate({ src, path, data }: NuxtTemplate, destDir: strin await fsExtra.writeFile(dest, compiledSrc) } -export async function compileTemplates(templates: NuxtTemplate[], destDir: string) { +export async function compileTemplates (templates: NuxtTemplate[], destDir: string) { return Promise.all(templates.map(t => compileTemplate(t, destDir))) } @@ -32,7 +32,7 @@ export async function scanTemplates (dir: string, data?: Object) { })) } -export async function watchTemplate(template: NuxtTemplate, watcher: any, cb: Function) { +export async function watchTemplate (template: NuxtTemplate, watcher: any, cb: Function) { template.data = new Proxy(template.data, { // TODO: deep watch option changes }) diff --git a/packages/nuxt3/src/builder/watch.ts b/packages/nuxt3/src/builder/watch.ts index 6ccc1f43e7..96a19b7cda 100644 --- a/packages/nuxt3/src/builder/watch.ts +++ b/packages/nuxt3/src/builder/watch.ts @@ -1,7 +1,7 @@ -import chokidar, { WatchOptions } from 'chokidar' import { relative } from 'path' +import chokidar, { WatchOptions } from 'chokidar' -export function createWatcher(dir: string|string[], options?: WatchOptions) { +export function createWatcher (dir: string|string[], options?: WatchOptions) { const watcher = chokidar.watch(dir, { ignored: [], ignoreInitial: true, diff --git a/packages/nuxt3/src/webpack/utils/style-loader.ts b/packages/nuxt3/src/webpack/utils/style-loader.ts index cee82cd886..e9f470f3b7 100644 --- a/packages/nuxt3/src/webpack/utils/style-loader.ts +++ b/packages/nuxt3/src/webpack/utils/style-loader.ts @@ -21,7 +21,7 @@ export default class StyleLoader { return this.buildContext.buildOptions.extractCSS } - get onlyLocals() { + get onlyLocals () { // Not supported anymore by css-loader return false // Boolean(this.isServer && this.extractCSS) }