# haxcv-jsh

> haxcv-jsh is javascript Compiler with

Latest version **1.0.3** (published 2018-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install haxcv-jsh
pnpm add haxcv-jsh
yarn add haxcv-jsh
bun add haxcv-jsh
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-03-04 |
| First published | 2018-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Manassa Joseph |
| Maintainers | haxcv |
| Keywords | haxcv-cgi, jsh |

## Links

- npm: https://www.npmjs.com/package/haxcv-jsh
- Repository: https://github.com/haxcv/haxcv-jsh
- Homepage: https://github.com/haxcv/haxcv-jsh#readme
- Issues: https://github.com/haxcv/haxcv-jsh/issues
- npm.io page: https://npm.io/package/haxcv-jsh

## Recent versions

- 1.0.3 (latest) — 2018-03-04
- 1.0.2 — 2018-02-26

## README

# haxcv-jsh
haxcv-jsh is javascript Compiler with 

used as Javascript Compiler with Haxcv Templates Engine 

# Install 
``
npm install haxcv-jsh
``
# simple compilation 
```javascript
var jsh = require("haxcv-jsh");
var string = "<?  print("hello wold");  ?>";
var newStr = jsh.compile(string);
```

# export data
```javascript
var jsh = require("haxcv-jsh");
jsh.name = "Manassa Joseph";
var string = "<?  {{  <p>full name : {{+this.name+}} </p>   }}  ?>";
var newStr = jsh.compile(string);
```

### readFile

```javascript
'use strict';
let fs = require('fs');
let jsh = require("haxcv-jsh");
jsh.title = "Welcome to haxcv";
jsh.keywords = ["Manassa","Js","haxcv","framewrok","jsH"];
let data = fs.readFileSync('template.jsh');
let newData = jsh.compile(data.toString());

console.log(newData);

```
> template.jsh
```html
<!DOCTYPE html>
<html>
<head>
    <title>{@this.title@}</title>
</head>
<body>

<?

 this.keywords.forEach((e) =>{
   {{
     <h2>keywords :  {{+e+}}</h2>
   }}
 });

 ?>  
</body>
</html>    
```

### require external jsH template 
```html
 <?
   jsH.require("./files/header.html);   
   jsH.require("./files/body.html);
   jsH.require("./files/footer.html);  
 ?>    
```
> header.html
```html
<!DOCTYPE html>
<html>
<head>
    <title>Welcome to website </title>
</head>
<body>
    <header>
        <nav>
         <!-- header list here -->
        </nav>
    </header>
```
> body.html
```html
<?
var menus = ["home","login","signup","about us"];
    menus.forEach(e=>{
     {{
       <ul>
         <li>
            <a href="{{+e+}}">e</a>
         </li>
       </ul>
     }}
?>
```
> footer.html 
```html
<footer>
  <?
var menus = ["Policy","Terms","Cookies","Career"];
    menus.forEach(e=>{
     {{
       <ul>
         <li>
            <a href="{{+e+}}">e</a>
         </li>
       </ul>
     }}
?>
</footer>
</body>
</html>
```

---
_Source: https://npm.io/package/haxcv-jsh · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
