
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
jnk compiler - CLI tool for generating JSX using concise Emmet-style syntax. It's like Emmet, but for React.
jnk is a CLI tool for generating JSX using concise Emmet-style syntax. It's like Emmet, but for React.
# Global installation (recommended)
npm install -g jnk
# Or use with npx
npx jnk "div.container>h1{Hello}"
jnk "div.container>h1{Hello}+p{World}"
import { jnk } from "jnk";
const jsx = jnk("Button.primary[onClick={handleClick}]{Save}");
console.log(jsx);
// <Button className="primary" onClick={handleClick}>Save</Button>
import { jnkWithAST } from "jnk";
const { ast, jsx } = jnkWithAST("div.container>h1{Hello}");
console.log(ast); // Abstract Syntax Tree for custom processing
console.log(jsx); // Generated JSX
# Simple div with class and children
jnk "div.container>h1{Hello}+p{World}"
# Output:
# <div className="container">
# <h1>Hello</h1>
# <p>World</p>
# </div>
# Component with props
jnk "Button.primary[onClick={handleClick}]{Save}"
# Output: <Button className="primary" onClick={handleClick}>Save</Button>
# Nested components
jnk "Card>CardHeader{Title}+CardContent{Some content}+CardFooter>Button{Ok}"
# Expression content
jnk "ul>li*{items.map(i => <li>{i}</li>)}"
# Multiplication with numbering
jnk "ul>li.item\$*3>a{Link \$}"
# Output:
# <ul>
# <li className="item1"><a>Link $</a></li>
# <li className="item2"><a>Link $</a></li>
# <li className="item3"><a>Link $</a></li>
# </ul>
# Grouping
jnk "(div.header+div.content)*2"
# Output:
# <div className="header" />
# <div className="content" />
# <div className="header" />
# <div className="content" />
> - child element+ - sibling element.class - adds className#id - adds id attribute[prop=value] - adds prop with string value[prop={expression}] - adds prop with JS expression{content} - text or JS expression content*N - multiply element N times*{expression} - expression content (like map)$ - numbering placeholder (item$ becomes item1, item2, etc.)$$$ - zero-padded numbering (item$$$ becomes item001, item002, etc.)() - grouping elementsgit clone https://github.com/your-username/jnk
cd jnk
npm install
npm run build
npm test
Contributions are welcome. Please keep code clean and follow best practices.
MIT © Janko Stanic
FAQs
jnk compiler - CLI tool for generating JSX using concise Emmet-style syntax. It's like Emmet, but for React.
The npm package jnk receives a total of 2 weekly downloads. As such, jnk popularity was classified as not popular.
We found that jnk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.