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

Shortcut to build asciidocs #13164

Merged
merged 3 commits into from
Aug 23, 2017
Merged

Shortcut to build asciidocs #13164

merged 3 commits into from
Aug 23, 2017

Conversation

epixa
Copy link
Contributor

@epixa epixa commented Jul 27, 2017

The command to build the Kibana docs using the elastic/docs repo can be
easy to forget, so this script is an easy to way to do it right every
time.

@epixa epixa added the review label Jul 28, 2017
The command to build the Kibana docs using the elastic/docs repo can be
easy to forget, so this script is an easy to way to do it right every
time.
src/docs/cli.js Outdated

const kibanaDir = resolve(__dirname, '..', '..');
const docsIndexFile = resolve(kibanaDir, 'docs', 'index.asciidoc');
const docsToolDir = resolve(kibanaDir, '..', 'docs');
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we add a fallback for elastic-docs? I can't stand having a docs project in my dev directory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about an environment variable fallback? I'm not a big fan of hardcoding alternatives

Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer a command line flag if it's going to be an argument

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call

For folks that clone the elastic docs repo to a different location than
as a sibling of kibana.
@epixa
Copy link
Contributor Author

epixa commented Aug 12, 2017

I made the docs repo location configurable via the --docrepo argument.

The drawback to this approach is that this will no longer pass all CLI arguments along to the underlying docs build tool. I didn't want to do any -- hackery to differentiate between the node script arguments and the docs build tool arguments, so I implemented logic in the node script itself for handling --open.

I think this is OK because this script is intended to be used specifically during development for Kibana docs rather than as a proxy/replacement for the full capabilities of the docs repo itself.

@epixa
Copy link
Contributor Author

epixa commented Aug 16, 2017

@spalger This is good for your review again

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

@epixa epixa merged commit 7b836f9 into elastic:master Aug 23, 2017
@epixa epixa deleted the docsrunner branch August 23, 2017 14:27
epixa added a commit that referenced this pull request Aug 23, 2017
* Shortcut to build asciidocs

The command to build the Kibana docs using the elastic/docs repo can be
easy to forget, so this script is an easy to way to do it right every
time.

* Configurable docs repo location

For folks that clone the elastic docs repo to a different location than
as a sibling of kibana.
epixa added a commit that referenced this pull request Aug 23, 2017
* Shortcut to build asciidocs

The command to build the Kibana docs using the elastic/docs repo can be
easy to forget, so this script is an easy to way to do it right every
time.

* Configurable docs repo location

For folks that clone the elastic docs repo to a different location than
as a sibling of kibana.
epixa added a commit that referenced this pull request Aug 23, 2017
* Shortcut to build asciidocs

The command to build the Kibana docs using the elastic/docs repo can be
easy to forget, so this script is an easy to way to do it right every
time.

* Configurable docs repo location

For folks that clone the elastic docs repo to a different location than
as a sibling of kibana.
@epixa
Copy link
Contributor Author

epixa commented Aug 23, 2017

6.x/6.1 fd084ae
6.0 ccf10fb
5.6 13369d5

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

Successfully merging this pull request may close these issues.

2 participants