How to use the @nuxt/utils.sequence function in @nuxt/utils

To help you get started, we’ve selected a few @nuxt/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nuxt / nuxt.js / packages / core / src / module.js View on Github external
async ready () {
    // Call before hook
    await this.nuxt.callHook('modules:before', this, this.options.modules)

    if (this.options.devModules && !this.options._start) {
      // Load every devModule in sequence
      await sequence(this.options.devModules, this.addModule.bind(this))
    }

    // Load every module in sequence
    await sequence(this.options.modules, this.addModule.bind(this))

    // Call done hook
    await this.nuxt.callHook('modules:done', this)
  }
github nuxt / nuxt.js / packages / core / src / module.js View on Github external
async ready () {
    // Call before hook
    await this.nuxt.callHook('modules:before', this, this.options.modules)

    if (this.options.devModules && !this.options._start) {
      // Load every devModule in sequence
      await sequence(this.options.devModules, this.addModule.bind(this))
    }

    // Load every module in sequence
    await sequence(this.options.modules, this.addModule.bind(this))

    // Call done hook
    await this.nuxt.callHook('modules:done', this)
  }
github nuxt / nuxt.js / packages / core / src / hookable.js View on Github external
async callHook (name, ...args) {
    if (!this._hooks[name]) {
      return
    }

    try {
      await sequence(this._hooks[name], fn => fn(...args))
    } catch (err) {
      name !== 'error' && await this.callHook('error', err)
      consola.fatal(err)
    }
  }