1.0.0 • Published 4 years ago

node-accio v1.0.0

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

Accio

The Summoning Charm used in Node!

Also 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 "node-accio";

@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": {
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true
    }
}

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

Document

work in progress :p

1.0.0

4 years ago