# bowtie-js

> Yet another template engine

Latest version **0.0.15** (published 2016-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install bowtie-js
pnpm add bowtie-js
yarn add bowtie-js
bun add bowtie-js
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2016-10-16 |
| First published | 2015-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Victor Alveflo |
| Maintainers | victorzki |
| Keywords | Template, engine, bowtie, bowtie-js |

## Links

- npm: https://www.npmjs.com/package/bowtie-js
- Repository: https://github.com/bowtie-js/bowtie
- Homepage: https://github.com/bowtie-js/bowtie#readme
- Issues: https://github.com/bowtie-js/bowtie/issues
- npm.io page: https://npm.io/package/bowtie-js

## Dependencies (5)

- [jison](https://npm.io/package/jison.md) ^0.4.15
- [mocha](https://npm.io/package/mocha.md) ^2.3.4
- [through2](https://npm.io/package/through2.md) ^2.0.0
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.5.10

## Recent versions

- 0.0.15 (latest) — 2016-10-16
- 0.0.14 — 2015-12-20
- 0.0.13 — 2015-12-17
- 0.0.12 — 2015-12-17
- 0.0.11 — 2015-12-15
- 0.0.10 — 2015-12-15
- 0.0.9 — 2015-12-14
- 0.0.8 — 2015-12-14
- 0.0.7 — 2015-12-13
- 0.0.6 — 2015-12-13
- 0.0.5 — 2015-12-13
- 0.0.4 — 2015-12-13
- 0.0.3 — 2015-12-13
- 0.0.2 — 2015-12-13
- 0.0.1 — 2015-12-08

## README

# Bowtie
[![Build Status](https://travis-ci.org/bowtie-js/bowtie.svg?branch=master)](https://travis-ci.org/bowtie-js/bowtie)
[![Coverage Status](https://coveralls.io/repos/bowtie-js/bowtie/badge.svg?branch=master&service=github)](https://coveralls.io/github/bowtie-js/bowtie?branch=master)

Expressive template engine for Node.js heavily inspired by [Jade](http://jade-lang.com/).

## Goals
This project aims to develop an expressive template language to write html documents using the [dry](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) and [kiss](https://en.wikipedia.org/wiki/KISS_principle) principles. And of course, remove the pain of writing angle brackets.
## Current status
This project is currently in it's pre-alpha stage. Current features:
- [x] Basic html output
- [x] Loops
- [x] If-Else
- [x] Mixins
- [x] Extending
- [x] Importing
- [ ] Variables

## Installation
```
$ npm install bowtie-js
```
##### Syntax highlighting
Syntax highlighting and auto completion is available for [Atom editor](https://atom.io/). Syntax highlighting is triggered on .bow-files.

 Install:
```
$ apm install atom-language-bowtie
```

## Usage
### With Gulp
Gulp compatible compiling comes out of the box with Bowtie, example:
```javascript
var gulp = require('gulp');
var bowtie = require('bowtie-js').gulp;

gulp.task('bowtie', function() {
  return gulp.src('*.bow')
    .pipe(bowtie({
      // Pretty output
      "pretty": true,
      // Object to pass to template engine
      "locals": {
        "title": "Example application"
      }
    }))
    .pipe(gulp.dest('./dist'));
});
```

### Example
```
!doctype("html")
html {
  head {
    title: $title
  }
  body {
    div.className {
      h1: "Example"
      p: "Hello world!"
    }
  }
}
```

The example above outputs:
```html
<html>
    <head>
        <title>Example application</title>
    </head>
    <body>
        <div class="className">
            <h1>Example</h1>
            <p>Hello world!</p>
        </div>
    </body>
</html>

```

## License
The MIT License

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