bookmark
📕 generator bookmark form the directory
You can quickly generate a directory page.
For example, there are many HTML pages in the folder, use bookmark build your index.html
, Then in gh-pages use it
Installation
yarn global add j-bookmark// npm install j-bookmark -g
Usage
[bm | bookmark] <command>
Example
src├── test│ └── ahtml└── testhtml
bm -d /path/to/xx -o /page/to/xx -p /path
$ bm -d src # output <ul> <li> <a href="src/test.html" target="_blank">1. test.html</a> </li> <li> <a href="src/test/a.html" target="_blank">2. a.html</a> </li></ul>
$ bm -d src -p /prefix # output <ul> <li> <a href="/prefix/test.html" target="_blank">1. test.html</a> </li> <li> <a href="/prefix/test/a.html" target="_blank">2. a.html</a> </li></ul>
$ bm -d src --ignore **/test/** # output <ul> <li> <a href="test.html" target="_blank">1. test.html</a> </li></ul>
$ bm -d src -o output.html # output ├── output.html├── test│ └── a.html└── test.html
Commands
-v, --version output the version number -d --directory [value] entry directory
Development
git clone https://github.com/lijinke666/bookmark.gitnpm install | yarnnpm link
Test Case
npm run test