0.21.0 • Published 1 year ago

@tinijs/meta v0.21.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.21.0

1 year ago

0.20.0

1 year ago

0.19.0

1 year ago

0.18.0

1 year ago

0.17.0-alpha.0

1 year ago

0.17.0-alpha.1

1 year ago

0.17.0

1 year ago

0.16.0

1 year ago

0.15.0

2 years ago

0.14.0

2 years ago

0.13.0

2 years ago

0.10.0

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.11.0

2 years ago

0.9.0

2 years ago

0.12.0

2 years ago

0.8.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.6.0

2 years ago

0.0.2

3 years ago