Nascent Political Miscreant

    @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);
      }
    })();

    Install

    npm i @tarik02/bladejs

    DownloadsWeekly Downloads

    4

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    94.4 kB

    Total Files

    49

    Last publish

    Collaborators

    • tarik02