FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

support docsify init --plugins by tool3 · Pull Request #99 · docsifyjs/docsify-cli · GitHub

support docsify init --plugins - #99

Merged
sy-records merged 32 commits into
docsifyjs:masterfrom
tool3:master
Jun 11, 2021
Merged

support docsify init --plugins#99
sy-records merged 32 commits into
docsifyjs:masterfrom
tool3:master

Conversation

tool3 commented Mar 12, 2020
edited
Loading

Copy link
Copy Markdown
Contributor

having a go at #98 .

command: init
option: --plugins, -p

plugins are now supported via the following usage:
docsify init docs/ -p search gitalk <some_other_plugin>

note that by default a plugin will be added as a script tag with a url pointing to https://unpkg.com/docsify/lib/plugins/<plugin_name> otherwise it will use the url provided as an argument.

example and documentation was added to docs/README

anikethsaha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like you removed the main readme ! please revert it .
there are unncessary files like .nojekyll , index.html etc in root. Please check.
please add tests as well

tool3 commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

sorry about that! have no idea where those came from 👀

by tests do you mean adding a test to the ava snapshot e2e ?

Thanks !

tool3 commented Mar 13, 2020

Copy link
Copy Markdown
Contributor Author

okay so I added tests but in order to do that I had to change the test structure a bit to accept command help.

let me know what you think 🤘🏼

Comment thread README.md

Copy link
Copy Markdown
Member

Thanks ! I will review it soon

anikethsaha self-requested a review March 13, 2020 09:19
anikethsaha self-assigned this Mar 13, 2020

anikethsaha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Apologizes for the delay. Completely lost track of this.

Comment thread lib/commands/init.js Outdated
jhildenbiddle linked an issue Jun 18, 2020 that may be closed by this pull request
tool3 requested a review from anikethsaha June 22, 2020 11:29

noraj commented Apr 28, 2021

Copy link
Copy Markdown

@anikethsaha is that possible to re-review?

Comment thread lib/commands/init.js Outdated
replace(target(filename), '_plugins_', '_plugin\n '.repeat(plugins.length))
plugins.forEach(plugin => {
const major = version[0]
const url = plugin.includes('//') ? plugin : `https://cdn.jsdelivr.net/npm/docsify@${major}/lib/plugins/${plugin}.min.js`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

if use ./bin/docsify init docs2 -p 1, An exception will be thrown here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I added the enquirer in #117, you can use this here as well.

see https://github.com/enquirer/enquirer#multiselect-prompt

jamesgeorge007 May 27, 2021
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ideally, we should support specifying a list of plugins as an argument to --plugins such that the prompt shows up on not supplying any or passing in an unsupported plugin.

docsify init [path] --plugins, -p [...plugins]

Comment thread lib/commands/init.js Outdated
Comment thread lib/template/index.html Outdated
Comment thread README.md Outdated
Comment thread docs/README.md Outdated
sy-records requested a review from QingWei-Li May 19, 2021 03:12

Copy link
Copy Markdown
Member

resolve #99 (comment) .

When executing the init command, the user may not know which plugins he wants to use and the corresponding plugin names

sy-records requested a review from a team May 25, 2021 10:39
Comment thread lib/commands/init.js Outdated

Copy link
Copy Markdown
Member

resolve #99 (comment) .

When executing the init command, the user may not know which plugins he wants to use and the corresponding plugin names

The success message should come after the prompt.

sy-records and others added 3 commits May 27, 2021 09:35
Co-authored-by: James George <jamesgeorge998001@gmail.com>
sy-records requested a review from jamesgeorge007 May 27, 2021 03:28

Copy link
Copy Markdown
Member

The success message should come after the prompt.

done.

Copy link
Copy Markdown
Member

@jamesgeorge007 Thank you for the modifications 790e96c

But there seems to be some problems:

  1. use ctrl+c , will output the help message

  1. use ctrl+c, The docs-test directory is created, but the tip message is missing
Initialization succeeded! Please run docsify serve docs-test/

sy-records requested a review from jamesgeorge007 May 28, 2021 02:36
jamesgeorge007 removed their request for review May 28, 2021 06:10

Copy link
Copy Markdown
Member

Good catch. I've pushed a fix

jamesgeorge007 requested a review from sy-records May 28, 2021 06:11
sy-records merged commit 8bb295c into docsifyjs:master Jun 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

support plugins with docsify init

6 participants


Back | FazBrowse Home | New Git URL