0.1.37 • Published 7 months ago

@ealmansi/jagger v0.1.37

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@ealmansi/jagger

Setup

  1. Install dependencies:
npm add @ealmansi/jagger
  1. Configure prebuild script:
// package.json
{
  "scripts": {
    "prebuild": "jagger-generate"
  }
}

Usage

import { Jagger } from "@ealmansi/jagger";

export class Logger {
  constructor() {}
  log(message: string): void {
    console.log(message);
  }
}

export class App {
  constructor(private readonly logger: Logger) {}
  start() {
    this.logger.log("App started!");
  }
}

export class AppModule extends Jagger.Module {
  provideLogger = Jagger.instance(Logger);
  provideApp = Jagger.instance(App);
}

export abstract class AppComponent extends Jagger.Component {
  static module: AppModule;
  abstract buildApp(): App;
}

// in index.ts
const app = new AppComponentImpl().provideApp();
app.start(); // App started!
0.1.37

7 months ago

0.1.30

7 months ago

0.1.31

7 months ago

0.1.32

7 months ago

0.1.27

7 months ago

0.1.28

7 months ago

0.1.29

7 months ago

0.1.21

7 months ago

0.1.22

7 months ago

0.1.23

7 months ago

0.1.20

7 months ago

0.1.19

7 months ago

0.1.17

7 months ago

0.1.18

7 months ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago