yjc 0.0.1

tiny javascript compiler
Documentation
  • Coverage
  • 0%
    0 out of 135 items documented0 out of 53 items with examples
  • Size
  • Source code size: 182.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.78 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 22s Average build duration of successful builds.
  • all releases: 22s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • yisar

yjc

Yeilding Javascript compiler

  • Simplest bundler algorithm
  • Smallest JavaScript compiler

input

import { hello } from './hello.js'

function world() {
  return 'World'
}

console.log(hello)
console.log(world())

output

(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);