haxcv-jsh
haxcv-jsh is javascript Compiler with
used as Javascript Compiler with Haxcv Templates Engine
Install
npm install haxcv-jsh
simple compilation
var jsh = ;var string = "<? print("hello wold"); ?>";var newStr = jsh;
export data
var jsh = ;jshname = "Manassa Joseph";var string = "<? {{ <p>full name : {{+this.name+}} </p> }} ?>";var newStr = jsh;
readFile
'use strict';let fs = ;let jsh = ;jshtitle = "Welcome to haxcv";jshkeywords = "Manassa""Js""haxcv""framewrok""jsH";let data = fs;let newData = jsh; console;
template.jsh
{@this.title@} <? this.keywords.forEach((e) =>{ {{ keywords : {{+e+}} }} }); ?>
require external jsH template
<? jsH.require("./files/header.html); jsH.require("./files/body.html); jsH.require("./files/footer.html); ?>
header.html
Welcome to website <!-- header list here -->
body.html
<?var menus = ["home","login","signup","about us"]; menus.forEach(e=>{ {{ e }}?>
footer.html
<?var menus = ["Policy","Terms","Cookies","Career"]; menus.forEach(e=>{ {{ e }}?>