Package Exports
- liquid-to-handlebars
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (liquid-to-handlebars) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
liquid-to-handlebars 
Convert liquid templates to handlebars templates. Quick way to convert - for example - HTML components from Bootstrap's docs into handlebars UI components in a way that makes them actually reusable in node.js projects.
Install
Install with npm
$ npm i liquid-to-handlebars --save-dev
Usage
var convert = require('liquid-to-handlebars');
// pass a string of HTML with liquid
console.log(convert('{liquid}'));
So replacement patterns for number of tags and filters have not been implemented. Here is the replacement pattern for converting {{content}}
liquid variables to {% body %}
layout tags, compatible with [assemble][], [verb][] and any other [template][]-base application.
{
pattern: tag.makeVariable('content', {matter: ''}),
replacement: function (match, str) {
return '{% body %}';
}
}
Example project
To test drive the example:
git clone https://github.com/jonschlinkert/liquid-to-handlebars.git
Then cd
into the project and run npm install
.
Next, clone Bootstrap
Don't use Bower, use git clone
since we need to actual HTML docs:
git clone https://github.com/twbs/bootstrap.git "vendor/bootstrap"
Next, run
node examples/example
Converted files will be written to the ./results
directory.
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on July 15, 2015.