industry-include

Provides a dependency tree object to your method parameters.


License
MIT
Install
npm install industry-include@1.0.0

Documentation

IndustryInclude Build Status

Provides a dependency tree object to your method parameters.

Usage

Given you have files/files.test.js at ${__dirname}:

import { factory } from "industry"
import { instance } from "industry-instance"
import { include } from "industry-include"
import { standard_io } from "industry-standard-io"

class Test {
  constructor() {
    this.include(`${__dirname}`)
  }

  hello({ include: { files: { test } } }) {
    test // import test from `${__dirname}/files/files.test.js`
  }
}

let test = factory(Test)
  .set("instance", instance)
  .set("include", include)
  .set("standard_io", standard_io)

test().hello()