• Stars
    star
    102
  • Rank 334,346 (Top 7 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Asset pipeline for the Harp Web Server.

terraform

Terraform is the pre-processor engine for the Harp web server. Terraform does not write or serve files. It processes and provides a layout/partial paradigm.

Features

  • pre-processors
  • layouts
  • partials
  • metadata (via _data.json)
  • LRU cache (production mode)

Supported Pre-Processors

HTML – EJS, Jade, Markdown CSS – LESS, Stylus, Sass (SCSS) JavaScript – CoffeeScript

Install

npm install terraform

API

Step 1) require the library

var terraform = require('terraform')

Step 2) set the root

  • publicPath (String): path to public directory
  • globals (Object): global variables to be available to every template
var planet = terraform.root("path/to/public/dir", { "title": "Bitchin" })

Step 3) render a file

planet.render('index.jade', { "title": "Override the global title" }, function(error, body){
  console.log(body)
})

Tests

Please run the tests

npm install
npm test

License

Copyright Β© 2012–2014 Chloi Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the β€œSoftware”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED β€œAS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

harp

Static Web Server/Generator/Bundler
JavaScript
4,995
star
2

surge

CLI for the surge.sh CDN
JavaScript
2,861
star
3

phonegap

access core functions on Android, iPhone and Blackberry using JavaScript
JavaScript
2,104
star
4

dbox

NodeJS SDK for Dropbox API (THIS LIBRARY IS OBSOLETE!!)
JavaScript
513
star
5

learn-ruby

files for learning ruby. quickly.
Ruby
79
star
6

nhl

a screen scraping nhl.com api (this project was created as a demonstration)
JavaScript
70
star
7

rolodex

Node user management system using redis
JavaScript
42
star
8

phonegap-examples

open source phonegap examples go here
JavaScript
33
star
9

thug

ORM replacement that provides a functional style object filtration and validation system.
JavaScript
20
star
10

pmpknpi

A RESTful Blog API written in Merb
JavaScript
19
star
11

node-redis-tag

Node tag system using redis.
JavaScript
18
star
12

waterfront

A generic message broker system on top of ZeroMQ with discovery patterns for push/pull, req/rep, pub/sub.
JavaScript
18
star
13

git-harvest

github hook for posting time to harvest
Ruby
16
star
14

node-redis-authorization

Node authorization system built on redis.
JavaScript
12
star
15

phonegap-docs

hand written docs for phonegap and xui
JavaScript
11
star
16

statuscodedrinkinggame

drinking game API built on Smart Platform
JavaScript
8
star
17

smart-messagepub

send AIM, Google Chat, Email, Twitter, Phone, and SMS on the smart platform.
JavaScript
7
star
18

hb-browserify

a boilerplate project for using harp with browserify.
HTML
7
star
19

alluvium

time-series analytics for static web sites.
JavaScript
6
star
20

pressman

email templating system
JavaScript
6
star
21

merb_can_filter

merb plugin for filtering Markdown or Textile to HTML (also does syntax highlighting via coderay).
Ruby
5
star
22

gambit

A minimal mobile UX navigation library for html5 mobile web and cordova applications.
JavaScript
5
star
23

yonder

Redirects for front-end applications. Works on surge.sh.
JavaScript
5
star
24

very-old-phonegap-and-xuijs-websites

stumbled on this old repo late one night. decided to publish it.
JavaScript
5
star
25

refuze

A natural language job queue for doing things later. Built on Redis.
JavaScript
5
star
26

exhale

expiring token system for ephemeral tasks such as email verification and password reset
JavaScript
5
star
27

microplatform

JavaScript
4
star
28

smart-helpers

layout, form, and date helpers for Joyent Smart Platform
JavaScript
4
star
29

yoke

preprocessor for language agnostic concatenation
JavaScript
4
star
30

merb_bot_test

Quick and dirty spam protection using a math equation.
Ruby
3
star
31

merbums

Merb powered forum inspired by Beast
Ruby
3
star
32

nwo

another web publishing tool by sintaxi
JavaScript
3
star
33

aria

A client library for Aria API
JavaScript
3
star
34

hb-minimal

A minimal boilerplate for the Harp Application
3
star
35

urlinfo-server

a service for providing information on any given url
JavaScript
3
star
36

ru

dunno what this is
JavaScript
2
star
37

smart-platform

Joyent Smart Platform
Perl
2
star
38

node-timerange

returns start and end timestamps for YYYY-MM-DD, YYYY-MM, or YYYY
JavaScript
2
star
39

sintaxi.github.com

github can blog
JavaScript
2
star
40

start

CSS
2
star
41

surge-sdk

JavaScript SDK used by Surge.sh CLI
JavaScript
2
star
42

pwa

JavaScript
2
star
43

harp-boilerplates

CLI for searching the Harp Boilerplates registry.
JavaScript
1
star
44

vanjs.no.de

chat example using redis, socket.io, express
JavaScript
1
star
45

nhl-client

CSS
1
star
46

virtual-dom-starter

bare-bones virtual-dom starter using main-loop and browserify/watchify with npm run scripts
JavaScript
1
star
47

localci

test runner for front-end web projects
1
star
48

popp

command line tool to pluck the first line out of file
JavaScript
1
star
49

foxy

a simple proxy middle for CORS
JavaScript
1
star
50

cldflr

static publishing to surge.sh fronted by cloudflare
JavaScript
1
star
51

roller

an example on how to use rolodex
JavaScript
1
star