@tarik02/bladejs
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

bladejs

TravisCI Build Status AppVeyor Build Status npm version

Installation

$ yarn add @tarik02/bladejs
# or
$ npm install --save @tarik02/bladejs

Usage

import {
  CompiledTemplate,
  Runtime,
  TemplateProvider,
} from '@tarik02/bladejs';

const templateProvider: TemplateProvider = {
  async getTemplateCompiledFile(name: string): Promise<CompiledTemplate | undefined> {
    // TODO: Load template, return undefined if does not exist
  },

  async isOutdated(name: string, template: CompiledTemplate, creationTime: number): Promise<boolean> {
    // TODO: Return true if template is outdated (this will cause to {getTemplateCompiledFile} call)
  },
};

const runtime = new Runtime([templateProvider]);

(async () => {
  for await (const chunk of runtime.render('test')) {
    process.stdout.write(chunk);
  }
})();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    0
  • 2.2.0
    0
  • 2.1.0
    0
  • 2.0.0
    0

Package Sidebar

Install

npm i @tarik02/bladejs

Weekly Downloads

0

Version

3.0.0

License

MIT

Unpacked Size

94.4 kB

Total Files

49

Last publish

Collaborators

  • tarik02