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

feat(docz-core): add serve command #855

Merged
merged 1 commit into from
May 8, 2019

Conversation

arthurdenner
Copy link
Contributor

Description

Hi! 👋 This PR adds a new command, docz serve, which builds the site using docz build and then serves the output directory as a static site spawning serve.

PS: I don't know why, but the visual output is not the same as when you run serve from the command line. I'll try to figure it out later, but it doesn't prevent the merge if everything works as expected.


export const serve = async (args: Arguments<any>) => {
const config = await parseConfig(args)
const dist = paths.getDist(config.dest)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that cross-spawn handles relative paths well (that means I could have used config.dest directly, but I decided to take a more secure approach.

@pedronauck pedronauck merged commit 73311bd into doczjs:dev May 8, 2019
pedronauck pushed a commit that referenced this pull request May 8, 2019
@arthurdenner arthurdenner deleted the serve-command branch May 23, 2019 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants