https://github.com/invrs/industry-include
Provides a dependency tree object to your method parameters
https://github.com/invrs/industry-include
Last synced: about 2 months ago
JSON representation
Provides a dependency tree object to your method parameters
- Host: GitHub
- URL: https://github.com/invrs/industry-include
- Owner: invrs
- Created: 2016-02-19T22:02:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-11T06:53:28.000Z (about 10 years ago)
- Last Synced: 2025-10-13T10:26:48.180Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IndustryInclude [](https://travis-ci.org/invrs/industry-include)
Provides a dependency tree object to your method parameters.
## Usage
Given you have `files/files.test.js` at `${__dirname}`:
```js
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()
```