0.16.0 • Published 3 months ago

@tinijs/toolbox v0.16.0

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

TiniJS Toolbox

Useful services, helpers, ... for using in TiniJS apps.

Install

To install the module: npm i @tinijs/toolbox

It is recommended to download the Skeleton for a ready-to-use structured project.

For more, please visit: https://tinijs.dev (TODO)

Usage

  • Create the providers.ts
import {DependencyProviders} from '@tinijs/core';

export default {
  fetchService: () => import('@tinijs/toolbox/fetch/service'),
} as DependencyProviders;
  • Register the providers in app.ts
import providers from './providers';

@App({providers})
export class AppRoot extends TiniComponent {}
  • Inject & use the dependency
import {Inject} from '@tinijs/core';
import {FetchService} from '@tinijs/toolbox';

@Page({
  name: 'app-page-home',
})
export class AppPageHome extends TiniComponent {
  @Inject() fetchService!: FetchService;

  async onInit() {
    const data = await this.fetchService.get('https://jsonplaceholder.typicode.com/todos/1')
  }
}

API

// TODO

Developement

  • Create a home for TiniJS: mkdir TiniJS && cd TiniJS
  • Fork the repo
  • Install dependencies: cd toolbox && npm i
  • Make changes & preview locally: npm run build && npm pack
  • Push changes & create a PR 👌

License

@tinijs/toolbox is released under the MIT license.

0.16.0

3 months ago

0.15.0

4 months ago

0.14.0

4 months ago

0.13.0

4 months ago

0.12.0

5 months ago

0.11.0

6 months ago

0.10.0

7 months ago

0.9.0

8 months ago

0.8.0

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.0

8 months ago

0.3.0

8 months ago

0.2.0

8 months ago

0.1.1

9 months ago

0.1.0

9 months ago