0.18.0 • Published 12 days ago
@tinijs/meta v0.18.0
TiniJS Meta
The Meta module for TiniJS apps.
Install
To manually install the module: npm i @tinijs/core
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
metas.ts
import {AppMetas} from '@tinijs/meta';
// "null" means use the extracted values from index.html
export default null as unknown as AppMetas;
- Init the module in
app.ts
import {initMeta, AppWithMeta} from '@tinijs/meta';
import metas from './metas';
@App()
export class AppRoot extends TiniComponent implements AppWithMeta {
readonly meta = initMeta({metas});
}
- Use in pages
import {UseMeta, Meta, PageMetas} from '@tinijs/meta';
const metas: PageMetas = {
title: 'Oops',
description: 'Error 404, not found!',
// ...
};
@Page({
name: 'app-page-404',
})
export class AppPage404 extends TiniComponent {
@UseMeta() meta!: Meta;
onReady() {
this.meta.setPageMetas(metas);
}
}
API
// TODO
Developement
- Create a home for TiniJS:
mkdir TiniJS && cd TiniJS
- Fork the repo
- Install dependencies:
cd meta && npm i
- Make changes & preview locally:
npm run build && npm pack
- Push changes & create a PR 👌
License
@tinijs/meta is released under the MIT license.
0.18.0
12 days ago
0.17.0-alpha.0
1 month ago
0.17.0-alpha.1
1 month ago
0.17.0
1 month ago
0.16.0
4 months ago
0.15.0
4 months ago
0.14.0
4 months ago
0.13.0
5 months ago
0.10.0
8 months ago
0.1.0
9 months ago
0.3.0
9 months ago
0.2.0
9 months ago
0.1.1
9 months ago
0.11.0
6 months ago
0.9.0
8 months ago
0.12.0
6 months ago
0.8.0
9 months ago
0.5.0
9 months ago
0.4.0
9 months ago
0.6.0
9 months ago
0.0.2
1 year ago