Skip to content
/ jixen Public

jixen is a pre-processor for JavaScript which converts inline HTML expressions into actual JavaScript code which when executed will return the HTML element using the DOM API.

License

Notifications You must be signed in to change notification settings

aspizu/jixen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jixen

jixen is a pre-processor for JavaScript which converts inline HTML expressions into actual JavaScript code which when executed will return the HTML element using the DOM API.

State-of-the-art Shitcode

Usage

Install dependencies using pip

pip install -r requirements.txt

Run jixen on your code

python jixen in.js out.js

Examples

Input:

const v = `<button onclick={console.log('Hello')}>"Hello"</button>`
document.body.append(v)

Output:

const v = (() => {
  let e = document.createElement('button')
  e.append('Hello')
  e.addEventListener('click', () => {
    console.log('Hello')
  })
  return e
})()
document.body.append(v)

Documentation

see ~/DOCS.md

About

jixen is a pre-processor for JavaScript which converts inline HTML expressions into actual JavaScript code which when executed will return the HTML element using the DOM API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published