Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

nuxt generate #88

Open
jamesAtcodeninja opened this issue Feb 19, 2018 · 1 comment
Open

nuxt generate #88

jamesAtcodeninja opened this issue Feb 19, 2018 · 1 comment

Comments

@jamesAtcodeninja
Copy link

jamesAtcodeninja commented Feb 19, 2018

I created a NuxtGenerate ace command with the following code

class NuxtGenerate extends Command {
  /**
   * signature defines the requirements and name
   * of command.
   *
   * @return {String}
   */
  get signature () {
    return 'nuxtGenerate';
  }

  /**
   * description is the little helpful information displayed
   * on the console.
   *
   * @return {String}
   */
  get description () {
    return 'Generate for production the nuxt.js application.';
  }

  /**
   * handle method is invoked automatically by ace, once your
   * command has been executed.
   *
   * @param  {Object} args    [description]
   * @param  {Object} options [description]
   */
  * handle (args, options) {
    const config = Config.get('nuxt');
    config.dev = false;
    config.mode = 'spa';
    this.nuxt = new Nuxt(config);
    const builder = new Builder(this.nuxt);
    this.info('Generating nuxt.js application...');
    yield new Generator(this.nuxt, builder).generate();
  }
}

However, the generated code does not render the HTML from javascript.
Has anyone experienced using nuxt generate with adonuxt?

This question is available on Nuxt.js community (#c69)
@enero
Copy link

enero commented Nov 25, 2018

Has a solution been found?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants