Skip to content

fix: Allow config flag to take a parameter #105

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

Merged
merged 1 commit into from
May 18, 2020

Conversation

MichaelCurrin
Copy link
Contributor

@MichaelCurrin MichaelCurrin commented May 17, 2020

fixes #95

Resolves the error that appears like this without the fix.

docsify start . --config ssr.config.js
Unexpected argument: ./ssr.config.js

Based on tutorial: https://docsify.js.org/#/ssr

@MichaelCurrin MichaelCurrin mentioned this pull request May 17, 2020
1 task
Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

can you share link to docs for this ?

may be I missed something

@MichaelCurrin
Copy link
Contributor Author

The start command is missing from these docs.

The command is defined here.

command: 'start <path>',

This is what I see locally when reading the help:

Screen Shot 2020-05-18 at 10 30 14 am

@anikethsaha
Copy link
Member

sorry for not being clear.

by docs , I meant docs of yargs

@MichaelCurrin
Copy link
Contributor Author

Example:

docsify start . --config ssr.config.js --port 5000

port requires a number and accepts 1 argument.

config requires a string and so needs 1 argument, despite the code saying it needs zero.

If you leave off the value for --config, you don't get an error as "Unexpected argument: ./ssr.config.js. Since the default for config is false`, setting the flag and not giving an argument is the same as not using the flag at all, as far as I can see.

Copy link
Member

@anikethsaha anikethsaha left a comment

Choose a reason for hiding this comment

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

Thanks for pointing.. It was a bug we might missed. thanks

@anikethsaha anikethsaha merged commit bca132e into docsifyjs:master May 18, 2020
@MichaelCurrin
Copy link
Contributor Author

Thanks @anikethsaha :)

@MichaelCurrin MichaelCurrin deleted the fix-ssr-config-flag branch November 18, 2020 10:36
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.

SSR not working
2 participants