n3h-load-items
v1.2.0
Published
load items with auto generated names.
Downloads
3
Readme
N3H Load Items
Help load items with auto generated names.
Installation
npm install n3h-load-items
API
loadItems
(Options) => ItemDefinition[]
Options ~ {
dirname: String,
prefix?: String
}
ItemDefinition ~ see https://github.com/zhaoyao91/the-holder
Files in specified dir will be loaded recursively (except files in 'lib', 'todo' and 'ignore' dirs).
The if the original item definition lacks name, it will be generated by the relative file path:
- extension will be removed
- each token will be converted into lower camel case
- if option.prefix is specified, it will be attached before the name
License
MIT