0.21.0 • Published 11 months ago
@tinijs/toolbox v0.21.0
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.21.0
11 months ago
0.20.0
1 year ago
0.19.0
1 year ago
0.18.0
1 year ago
0.16.0
1 year ago
0.15.0
1 year ago
0.14.0
1 year ago
0.13.0
1 year ago
0.12.0
2 years ago
0.11.0
2 years ago
0.10.0
2 years ago
0.9.0
2 years ago
0.8.0
2 years ago
0.6.0
2 years ago
0.5.0
2 years ago
0.4.0
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago