Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]vuepress build should throw the Error directly #598

Closed
tyrion-yu opened this issue Jun 17, 2018 · 1 comment · Fixed by #615
Closed

[Feature request]vuepress build should throw the Error directly #598

tyrion-yu opened this issue Jun 17, 2018 · 1 comment · Fixed by #615
Labels
type: feature request Request to add a new feature

Comments

@tyrion-yu
Copy link

Feature request

What problem does this feature solve?

When vuepress dev, it's okey for a Vue Component to approach Browser Side Api like navigator.userAgent. But this can be wrong when vuepress build. Which means the user may ignore the potential mistakes when he push his code.

Recently I am trying to build a CONTINUOUS INTEGRATION with Jenkins to build vuepress docs automatically for my coworkers. VuePress catch the Error by itself when build, which makes the Jenkins scripts have no idea that there is something wrong with the build process. So I can't suggest the coworker to build locally to find out if there is anything abnormal.

What does the proposed API look like?

vuepress build should throw the Error directly. Or in some particular way, user can tell VuePress to throw the Error when something abnormal occurs.

How should this be implemented in your opinion?

program
  .command('build [targetDir]')
  .description('build dir as static site')
  .option('-d, --dest <outDir>', 'specify build output dir (default: .vuepress/dist)')
  .option('--debug', 'build in development mode for debugging')
  .action((dir = '.', { debug, dest }) => {
    const outDir = dest ? path.resolve(dest) : null
    // Do NOT catch the error
    // wrapCommand(build)(path.resolve(dir), { debug, outDir })
    build(path.resolve(dir), { debug, outDir })
  })

Are you willing to work on this yourself?**

I'm not sure.

@tyrion-yu tyrion-yu changed the title vuepress build should throw the Error directly [Feature request]vuepress build should throw the Error directly Jun 17, 2018
@ulivz
Copy link
Member

ulivz commented Jun 26, 2018

#615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request Request to add a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants