# modulite

Latest version **1.0.4** (published 2016-08-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install modulite
pnpm add modulite
yarn add modulite
bun add modulite
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2016-08-24 |
| First published | 2016-08-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | thelettereproduction |

## Links

- npm: https://www.npmjs.com/package/modulite
- Repository: https://github.com/restorationmedia/modulite
- Homepage: https://github.com/restorationmedia/modulite#readme
- Issues: https://github.com/restorationmedia/modulite/issues
- npm.io page: https://npm.io/package/modulite

## Dependencies (2)

- [nsobject](https://npm.io/package/nsobject.md) ^1.0.3
- [require-all](https://npm.io/package/require-all.md) ^2.0.0

## Recent versions

- 1.0.4 (latest) — 2016-08-24
- 1.0.3 — 2016-08-24
- 1.0.2 — 2016-08-24
- 1.0.1 — 2016-08-24
- 1.0.0 — 2016-08-24

## README

# Modulite
## Portable node components


### Getting Started

**Install the package**
```
npm install --save modulite
```

**Build a Module**
*Directory Structure*
```
/app
-index.js
-/modules
--/mymod
---/classes
----/foo
-----bar.js
---/config
----foobar.js
```
*classes/foo/bar.js*
```
var mod = require('modulite');
var config = mod.get_config('mymod.foobar');
module.exports = {
    hello: function(){
        console.log(config.hello);
    }
};
```

*classes/config/foobar.js*
```
module.exports = {
    hello: 'Hello World!'
};
```

**Implement a module**
*app/index.js*
```
var Modulite = require('modulite');
var mod = new Modulite({path: './modules'});
var mymod = mod.load('mymod');
console.log(mymod); // {foo: {bar: {hello: function(){...}}}
mymod.hello(); //Hello World!
```

Modulite will load in all files in your classes folder and parse all config files for use in the modules, or anywhere else after the .load function is called.

---
_Source: https://npm.io/package/modulite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
