https://github.com/icai/ndex
A small tool to index your directory files and generate index.html
https://github.com/icai/ndex
index-generator indexer
Last synced: 4 months ago
JSON representation
A small tool to index your directory files and generate index.html
- Host: GitHub
- URL: https://github.com/icai/ndex
- Owner: icai
- License: mit
- Created: 2018-09-28T13:33:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T06:29:12.000Z (over 3 years ago)
- Last Synced: 2024-04-26T03:22:53.649Z (over 1 year ago)
- Topics: index-generator, indexer
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ndex
> A small tool to index your directory files and generate index.html
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![MIT][mit-image]](LICENSE)## Setup
```bash
npm install ndex -g
```
## Usage
```bash
ndex -p ../0636920013327/html5canvas -e html -i *index.html
# or
ndex ../0636920013327/html5canvas -e html -i *index.html
```
```js
const ndex = requre('ndex')ndex('../0636920013327/html5canvas', 'html', '*index.html');
// (path: any, ext?: string, ignore?: boolean)```
module ndex
```js
const ndex: {
(path: any, ext?: string, ignore?: boolean): void;
config(template: any): void;
glob: typeof G; // glob function
treeFromPaths: (files: string[], baseDir: string, renderLabelFn: (arg0: Window, arg1: string, arg2: any, arg3: string, arg4: any, arg5: boolean) => string, options?: any) => any;
renderData(files: any, baseDir: any, renderLabelFn: any, options?: {
...;
}): any;
}```
### Custom Template
```js
ndex.config('the js file which return a function')
// reset to default template
ndex.reset()```
## Demo
[https://blog.w3cub.com/html5canvas/html5canvas/](https://blog.w3cub.com/html5canvas/html5canvas/)
## License
Copyright (c) 2018 Terry Cai. Licensed under the MIT license.
[npm-image]: https://img.shields.io/npm/v/ndex.svg
[npm-url]: https://npmjs.org/package/ndex
[travis-image]: https://img.shields.io/travis/icai/ndex/master.svg?label=linux
[travis-url]: https://travis-ci.org/icai/ndex
[downloads-image]: https://img.shields.io/npm/dm/ndex.svg
[downloads-url]: https://npmjs.org/package/ndex
[mit-image]: https://img.shields.io/badge/License-MIT-green.svg