industry-include

1.2.0 • Public • Published

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()

Readme

Keywords

none

Package Sidebar

Install

npm i industry-include

Weekly Downloads

3

Version

1.2.0

License

MIT

Last publish

Collaborators

  • winton