machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

how do i use this if i am building my project on backbone? #250

Closed davis closed 7 years ago

davis commented 9 years ago

currently i am using jspm with a hbs plugin, how could i use this instead? is there an npm installable, or something i can do this with:

import emblem from 'emblem';

let template = `
ul
  li hello world
  li goodbye world
`

let html = emblem.compile(template);
joebartels commented 8 years ago

yeah man. Looks like you had it mostly, https://tonicdev.com/568476660171480e008247cb/568476660171480e008247cc

'use strict';
let e = require("emblem");

let list = e.default.compile(`
ul
  li.class-name Item 1
  li.class-name Item 2
`);

console.log(list);