smalljs
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| smalljs [2026/08/12 18:22] – created donald | smalljs [2026/08/12 19:19] (current) – [Installing] donald | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SmallJS ====== | ====== SmallJS ====== | ||
| - | ==== Installing ==== | + | SmallJS |
| - | < | + | |
| - | How to Install | + | |
| + | |||
| + | ==== How to Install SmallJS on Windows ==== | ||
| + | < | ||
| SmallJS is a Smalltalk-to-JavaScript compiler. Here’s the official way to install it on Windows: | SmallJS is a Smalltalk-to-JavaScript compiler. Here’s the official way to install it on Windows: | ||
| 1. Install Prerequisites | 1. Install Prerequisites | ||
| Line 52: | Line 53: | ||
| You should have Smalltalk syntax highlighting and debugging support. | You should have Smalltalk syntax highlighting and debugging support. | ||
| </ | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Compile JavaScript into a standalone .exe file on Windows. ==== | ||
| + | < | ||
| + | Here are the best current options (as of 2026): | ||
| + | |||
| + | 1. Official Node.js SEA (Single Executable Applications) – Recommended | ||
| + | Node.js has built-in support for creating single executables. | ||
| + | |||
| + | Pros: Official, no third-party tools needed (in recent versions), relatively small size. | ||
| + | Cons: Still evolving; best with CommonJS (or bundled code). | ||
| + | |||
| + | Basic steps: | ||
| + | 1. Bundle your app first (recommended) | ||
| + | npx ncc build index.js -o dist | ||
| + | |||
| + | 2. Create config | ||
| + | echo ' | ||
| + | |||
| + | 3. Build the executable (Node 20+) | ||
| + | node --experimental-sea-config sea-config.json | ||
| + | |||
| + | Newer Node versions (25+) have even simpler --build-sea support. | ||
| + | |||
| + | 2. Bun (Easiest & Fastest) | ||
| + | bun build ./index.js --compile --outfile myapp.exe | ||
| + | Very simple and produces a real standalone executable. | ||
| + | |||
| + | 3. Other Popular Tools | ||
| + | |||
| + | | Tool | Type | Ease | Notes | Best For | | ||
| + | |-------------------|-------------------|------|------------------------------------|-------------------| | ||
| + | | Bun | Runtime | ||
| + | | Node.js SEA | Official | ||
| + | | pkg (yao-pkg) | Packager | ||
| + | | nexe | Packager | ||
| + | | Electron | ||
| + | | NW.js | Framework | ||
| + | |||
| + | Quick Recommendation | ||
| + | |||
| + | Simple script / CLI tool* → Use *Bun** (bun build --compile) | ||
| + | Pure Node.js app* → Use *Node.js SEA** | ||
| + | App with GUI* → Use *Electron** + electron-builder / electron-packager | ||
| + | Maximum compatibility* → Use *pkg** | ||
| + | |||
| + | Would you like a complete step-by-step guide for one of these methods (e.g. Bun or official Node SEA)? | ||
| + | </ | ||
| + | |||
smalljs.1786558965.txt.gz · Last modified: 2026/08/12 18:22 by donald
