Expressive template engine for Node.js heavily inspired by Jade.
This project aims to develop an expressive template language to write html documents using the dry and kiss principles. And of course, remove the pain of writing angle brackets.
This project is currently in it's pre-alpha stage. Current features:
- Basic html output
- Loops
- If-Else
- Mixins
- Extending
- Importing
- Variables
$ npm install bowtie-js
Syntax highlighting and auto completion is available for Atom editor. Syntax highlighting is triggered on .bow-files.
Install:
$ apm install atom-language-bowtie
Gulp compatible compiling comes out of the box with Bowtie, example:
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'));
});
!doctype("html")
html {
head {
title: $title
}
body {
div.className {
h1: "Example"
p: "Hello world!"
}
}
}
The example above outputs:
<html>
<head>
<title>Example application</title>
</head>
<body>
<div class="className">
<h1>Example</h1>
<p>Hello world!</p>
</div>
</body>
</html>
The MIT License