-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CLI improvements #1611
base: master
Are you sure you want to change the base?
CLI improvements #1611
Conversation
@@ -24,6 +24,7 @@ const addParser = (parser) => { | |||
subparser.addArgument('--handlers', {action: "store", metavar: "JS", help: "Overwrite the provided server handlers for client requests. See documentation for more details."}); | |||
subparser.addArgument('--datasetDir', {metavar: "PATH", help: "Directory where datasets (JSONs) are sourced. This is ignored if you define custom handlers."}); | |||
subparser.addArgument('--narrativeDir', {metavar: "PATH", help: "Directory where narratives (Markdown files) are sourced. This is ignored if you define custom handlers."}); | |||
subparser.addArgument('--customBuildOnly', {action: "storeTrue", help: "Error if a custom build is not found."}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the intention here but the word "custom" is a bit overloaded here -- this is checking if an auspice build is present in the current working directory, not whether the build has been customised (which would require introspection of the bundle).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've split the addition of this argument into its own commit: 0090265
Ok I understand the difference now. I chose --customBuildOnly
following the previous existence of --customBuild
, which seemed to be doing something similar? I can't think of a better name without being verbose like --onlyUseLocalAuspiceBuild
. Do you have suggestions?
b26aeeb
to
0090265
Compare
This logic is specific to build, so keep it there.
Updated the verbose logging to be technically correct: - The index file is copied from the root to dist/, then served from there. - Only favicon.png is served from the root given the subsequent lines of routing.
This has no effect other than a printed warning, and has been like this since 55c69bb.
When running from Auspice's root directory, this replaces an unhandled scandir error with a more meaningful message.
When specified, this prevents falling back to running from build files in Auspice's root directory, which can be unintentional when running from an external project.
0090265
to
f51dff6
Compare
Description of proposed changes
See commit messages.
Related issue(s)
Testing
(to be done by a Nextstrain team member) Create preview PRs on downstream repositories.N/A