@jpwilliams/microload
v0.0.3
Published
Load a path as an object.
Downloads
4
Readme
microload
A simplified version of microboot
and microloader
that synchronously loads a given path as an object.
Key features
- Requires and imports entire directories
- Ignores hidden files
Usage
yarn add microload
const { microload } = require('microload')
const lib = microload('./lib')
Based on the following tree structure, lib
would now be:
.
└── lib
├── config
│ ├── creds.js
│ └── tokens.json
├── getter.js
├── parser.js
└── utils
├── loadMongo.js
├── loadRedis.js
└── .loadRethink.js
{
"config": {
"creds": ...,
"tokens": ...
},
"getter": ...,
"parser": ...,
"utils": {
"loadMongo": ...,
"loadRedis": ...
}
}