0.0.15 • Published 8 years ago

bowtie-js v0.0.15

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Bowtie

Build Status Coverage Status

Expressive template engine for Node.js heavily inspired by Jade.

Goals

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.

Current status

This project is currently in it's pre-alpha stage. Current features:

  • Basic html output
  • Loops
  • If-Else
  • Mixins
  • Extending
  • Importing
  • Variables

Installation

$ npm install bowtie-js
Syntax highlighting

Syntax highlighting and auto completion is available for Atom editor. 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:

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>
    <head>
        <title>Example application</title>
    </head>
    <body>
        <div class="className">
            <h1>Example</h1>
            <p>Hello world!</p>
        </div>
    </body>
</html>

License

The MIT License

0.0.15

8 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago