close
Skip to content
jpwilliamsPublic

About

Load a relative path and create an object from it.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

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

About

Load a relative path and create an object from it.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages