All Projects → stevenvachon → Handlebars React

stevenvachon / Handlebars React

Licence: mit
Compile Handlebars templates to React.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Handlebars React

Ghost Caspro
👀ghost博客系统caspro主题,响应式,自适应,简洁
Stars: ✭ 87 (-28.69%)
Mutual labels:  handlebars
Scriban
A fast, powerful, safe and lightweight scripting language and engine for .NET
Stars: ✭ 1,360 (+1014.75%)
Mutual labels:  handlebars
Marko
A declarative, HTML-based language that makes building web apps fun
Stars: ✭ 10,796 (+8749.18%)
Mutual labels:  vdom
Koa Starter
🐨 A starter kit for a slightly opinionated koa project.
Stars: ✭ 87 (-28.69%)
Mutual labels:  handlebars
Electronjs.org
Electron website
Stars: ✭ 1,341 (+999.18%)
Mutual labels:  handlebars
Chatapp Demo
⚡️ multi room chat app demo, powered by socket.io
Stars: ✭ 104 (-14.75%)
Mutual labels:  handlebars
Karet
Karet is a library that allows you to embed Kefir observables into React VDOM
Stars: ✭ 81 (-33.61%)
Mutual labels:  vdom
Superfine
Absolutely minimal view layer for building web interfaces.
Stars: ✭ 1,542 (+1163.93%)
Mutual labels:  vdom
Ember Cli Postcss
🔥 A Postcss integration for ember-cli
Stars: ✭ 97 (-20.49%)
Mutual labels:  handlebars
Webpack Seed
🚀 A Multi-Page Application base on webpack and babel. webpack搭建基于ES6,支持模板的多页面项目
Stars: ✭ 113 (-7.38%)
Mutual labels:  handlebars
Accessible Html Content Patterns
♿️ The full HTML5 Doctor Element Index as well as common markup patterns for quick reference.
Stars: ✭ 93 (-23.77%)
Mutual labels:  handlebars
Dataformsjs
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
Stars: ✭ 95 (-22.13%)
Mutual labels:  handlebars
Nodejs Mysql Links
A CRUD Web Application with authentication using Nodejs, Mysql and other Javascript technologies
Stars: ✭ 110 (-9.84%)
Mutual labels:  handlebars
Openjdk Website
Website source
Stars: ✭ 86 (-29.51%)
Mutual labels:  handlebars
Knotx
Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
Stars: ✭ 119 (-2.46%)
Mutual labels:  handlebars
Fortiosapi
Python library aimed to be used by configuration management system using Fortigate/Fortios devices (REST API)
Stars: ✭ 86 (-29.51%)
Mutual labels:  vdom
Quarkus Tutorial
Quarkus Tutorial for https://dn.dev/master
Stars: ✭ 103 (-15.57%)
Mutual labels:  handlebars
Template
A super-simple way to create new projects based on templates.
Stars: ✭ 120 (-1.64%)
Mutual labels:  handlebars
Handlebars Iron
Handlebars middleware for Iron web framework
Stars: ✭ 119 (-2.46%)
Mutual labels:  handlebars
Light Blue Dashboard
🔥 Free and open-source admin dashboard template built with Bootstrap
Stars: ✭ 110 (-9.84%)
Mutual labels:  handlebars

handlebars-react NPM Version Build Status Dependency Status

Compile Handlebars templates to React.

Compile this:

<div>
	text1
	{{variable1}}
	{{#if variable2}}<span>text2</span>{{else}}text3{{/if}}
	<span data-attr="{{#if variable3}}value1{{/if}} value2">text4</span>
</div>

into this:

React.DOM.div(null,
	"text1",
	this.props.variable1,
	this.props.variable2 ? React.DOM.span(null,
		"text2"
	) : "text3",
	React.DOM.span({"data-attr":(this.props.variable3 ? "value1" : "") + " value2"},
		"text4"
	)
);

Installation

Node.js >= 5 is required; < 5.0 will need an ES6 compiler. Type this at the command line:

npm install handlebars-react

Usage

Server/Browserify

var HandlebarsReact = require("handlebars-react");

new HandlebarsReact(options)
.compile("<h1>{{title}}</h1>")
.then(result => console.log("done!"));

UMD/AMD/etc

Accessible via define() or window.HandlebarsReact.

Options

options.beautify

Type: Boolean
Default value: false
When true, output will be formatted for increased legibility.

options.env

Type: String
Default value: undefined
Option presets for your target environment: "development" or "production". Preset options can be overridden.

options.normalizeWhitespace

Type: Boolean
Default value: false
See handlebars-html-parser.

options.processCSS

Type: Boolean
Default value: false
See handlebars-html-parser.

options.processJS

Type: Boolean
Default value: false
See handlebars-html-parser.

options.useDomMethods

Type: Boolean
Default value: false
When true, available React.DOM convenience functions will be used instead of React.createElement().

Roadmap Features

  • convertHbsComments to JavaScript block comments (or HTML comments?)
  • convertHtmlComments to JavaScript block comments
  • ignoreComments option when React supports such (react#2810)
  • trimWhitespace option to remove spaces between elements (<tag> a word <tag> to <tag>a word<tag>)?

Changelog

  • 0.0.1–0.0.16 pre-releases
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].