@jpwilliams/microload

0.0.3 • Public • Published

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": ...
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @jpwilliams/microload

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

5.49 kB

Total Files

4

Last publish

Collaborators

  • jpwilliams