# @tarik02/bladejs

> Laravel's blade templating engine for JavaScript and TypeScript.

Latest version **3.0.0** (published 2021-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tarik02/bladejs
pnpm add @tarik02/bladejs
yarn add @tarik02/bladejs
bun add @tarik02/bladejs
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2021-06-15 |
| First published | 2019-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 92.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Tarik02 |
| Maintainers | tarik02 |
| Keywords | template, html, laravel, blade |

## Links

- npm: https://www.npmjs.com/package/@tarik02/bladejs
- Repository: https://github.com/Tarik02/laravel-blade-js
- Homepage: https://github.com/Tarik02/laravel-blade-js#readme
- Issues: https://github.com/Tarik02/laravel-blade-js#readme
- npm.io page: https://npm.io/package/@tarik02/bladejs

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.10.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2021-06-15
- 2.2.0 — 2020-01-31
- 2.1.0 — 2019-07-16
- 2.0.0 — 2019-07-16

## README

# bladejs
[![TravisCI Build Status](https://travis-ci.org/Tarik02/laravel-blade-js.svg?branch=master)](https://travis-ci.org/Tarik02/laravel-blade-js)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/f0an82rf5pdi4xl3/branch/master?svg=true)](https://ci.appveyor.com/project/Tarik02/laravel-blade-js/branch/master)
[![npm version](https://badge.fury.io/js/%40tarik02%2Fbladejs.svg)](https://badge.fury.io/js/%40tarik02%2Fbladejs)

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

## Usage
```typescript
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);
  }
})();
```

---
_Source: https://npm.io/package/@tarik02/bladejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
