neha-lang
v0.1.2
Published
Neha programming language compiler and CLI (Hindi keywords → TypeScript/JavaScript)
Maintainers
Readme
Neha Language (neha-lang)
A production-grade compiler and CLI for the Neha programming language — a Hindi-keyworded, statically-typed language that compiles to modern TypeScript/JavaScript for the web.
Features
- Hindi → JS/TS keyword transformation
- Import/export syntax:
le ... se 'module'andbhej ... - Async/await, classes, control flow, loops
- JSX/TSX support (React/Next.js friendly)
- Esbuild-based build pipeline with source maps
neha checktype checking via TypeScriptneha testminimal test frameworkneha initstarter template
CLI
neha init <app-name>neha devneha buildneha checkneha test
Example (Neha)
le React, { useState } se 'react';
aSync_kaam is not valid; use async_kaam
kaam App(): JSX.Element {
tay [count, setCount] = useState<number>(0);
de (
<button onClick={() => setCount(count + 1)}>
आपने {count} बार click किया है
</button>
);
}
bhej default App;Development
- Node >= 18 is required
- Install dependencies:
npm install - Run CLI:
node bin/neha.js --help
License
MIT
Publish to npm
This repo contains two publishable packages:
neha-lang(the compiler/CLI)create-neha-app(the scaffolder)
Prepare metadata in package.json files (already configured). Then:
# from repo root for neha-lang
npm publish --access public
# from repo root/create-neha-app for scaffolder
cd create-neha-app
npm publish --access publicTip: test the tarballs locally before publishing:
# build tarball for neha-lang
npm pack
# build tarball for create-neha-app
cd create-neha-app
npm packUsage after publish
Install CLI globally (optional):
npm i -g neha-lang
neha --helpCreate a new app via npm create (recommended):
npm create neha-app@latest my-app
cd my-app
npm install
npm run dev