0.1.1 • Published 3 years ago

accio-js v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Accio

A dependency injection lib that use Typescript.

Install

npm i node-accio
# or
yarn add node-accio

Quick Start

your index.ts file:

import { Injectable, MainApplication, boost } from "accio-js";

@Injectable()
export class TheElderWand {
    wave() {
        console.log("boomb!!");
    }
}

@MainApplication()
export class Wizard {
    constructor(private wand: TheElderWand) {}

    @boost()
    use() {
        this.wand.wave();
    }
}

your tsconfig.json file:

{
    "compilerOptions": {
        "target": "ES2015",
        "moduleResolution": "node",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true
    }
}

run ts-node index.ts then you will get boomb!! in your terminal!

Document

work in progress :p

0.1.1

3 years ago

0.1.0

3 years ago