https://github.com/yisar/pek
Tiny JavaScript Compiler
https://github.com/yisar/pek
resumable server-side-rendering ssr
Last synced: 7 months ago
JSON representation
Tiny JavaScript Compiler
- Host: GitHub
- URL: https://github.com/yisar/pek
- Owner: yisar
- License: mit
- Created: 2018-04-03T10:32:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-08-10T07:55:31.000Z (7 months ago)
- Last Synced: 2025-08-10T09:21:06.798Z (7 months ago)
- Topics: resumable, server-side-rendering, ssr
- Language: Rust
- Homepage:
- Size: 62.8 MB
- Stars: 733
- Watchers: 11
- Forks: 60
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - yisar/pek - Tiny JavaScript Compiler (Rust)
README
# Pek
> Tiny Javascript compiler
- Simplest bundler algorithm
- Smallest JavaScript compiler
input
```js
import { hello } from './hello.js'
function world() {
return 'World'
}
console.log(hello)
console.log(world())
```
output
```js
(function (global) {
const P$hello_js$hello = 'hello';
const P$index_js$world = () => console.log("world");
console.log(P$hello_js$hello);
console.log(P$index_js$world());
})(typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
```