blaze2gasoline
v0.2.5
Published
Converts Blaze template (html and js code) to json - input file for gasoline-turbo
Downloads
18
Maintainers
Readme
blaze2gasoline
Convert Meteor Blaze template (html and js code) to input file for Gasoline Turbo.
Gasoline Turbo can generate Blaze, React or Angular template, so you can use it in conjuction with this package to convert Meteor projects from Blaze to React or Angular. Don't expect miracles, but it can save you from a lot of (boring) manual work.
Project status
Under development - just started.
Example apps
Meteor Kitchen
- Meteor Kitchen UI is using blaze2gasoline. See Preview video at Youtube.
Blaze to React online converter
- Live application is here: blaze2react. You can find source code (kitchen project) here.
Usage
When installed globally as npm module npm install -g blaze2gasoline
, you can run CLI from your terminal:
blaze2gasoline -i input.html -o output.json
-i, --input Input file
-o, --output Output file
-w, --overwrite Overwrite existing output file
Or you can add it to your node.js (or Meteor) application by running meteor npm install --save blaze2gasoline
and in your code:
const b2g = require("blaze2gasoline");
var gas = b2g.blaze2gasoline(htmlString, jsString);
(works both-client side and server-side)
Examples
Please install blaze2gasoline
and gasoline-turbo
first
Convert Blaze to React
blaze2gasoline -i path_to_blaze_file.html -o ./gas.json
gasoline-turbo -i ./gas.json -o ./ -f react
Convert Blaze to Angular
blaze2gasoline -i path_to_blaze_file.html -o ./gas.json
gasoline-turbo -i ./gas.json -o ./ -f angular
Angular is not supported yet by gasoline-turbo, but contributions are welcome!
To be continued...