support docsify init --plugins#99
Conversation
anikethsaha
left a comment
There was a problem hiding this comment.
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
|
sorry about that! have no idea where those came from 👀 by tests do you mean adding a test to the ava snapshot e2e ? Thanks ! |
|
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 🤘🏼 |
|
Thanks ! I will review it soon |
anikethsaha
left a comment
There was a problem hiding this comment.
Apologizes for the delay. Completely lost track of this.
|
@anikethsaha is that possible to re-review? |
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` |
There was a problem hiding this comment.
I added the enquirer in #117, you can use this here as well.
There was a problem hiding this comment.
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]|
resolve #99 (comment) . When executing the |
The success message should come after the prompt. |
Co-authored-by: James George <[email protected]>
done. |
|
@jamesgeorge007 Thank you for the modifications 790e96c But there seems to be some problems:
|
|
Good catch. I've pushed a fix |





having a go at #98 .
command:
initoption:
--plugins, -pplugins 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