hello-index
v1.0.1
Published
Auto-generated index file to require all files in a directory
Downloads
11
Readme
hello-index
hello-index is an auto-generated (and customizable) index file to require all files in a directory.
Installation
yarn add hello-index
Usage
'use strict'
const index = require('hello-index')
module.exports = index(__dirname)
By default, all files and directories in __dirname
will be added to the export list. All dotfiles will be ignored.
API
function (basePath, [options])
Options
case
: AString
explaining how to export filenames, can be one ofexact
(match case exactly),camel
(use camelCase), orclass
(use ClassName case) (default:camel
)ignore
: AnArray
of files or directories to ignore (default:[]
)