npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

xpiler

v1.0.7

Published

A lightweight Node.js to executable compiler

Readme

🚀 Xpiler - A Native Node.js Compiler using Go

Xpiler is a native Node.js compiler designed to package JavaScript/Node.js applications into standalone executables. It achieves this by leveraging Go for efficient bundling and execution, similar to how go build works in Go projects.


🟢 Features

  • Compile JavaScript/Node.js codebases into standalone executables.
  • Cross-platform support for Windows, Linux, and macOS.
  • Native compilation using Go, no third-party dependencies.
  • Command-line interface (CLI) with versatile options.

🟢 Installation

Clone the repository and build the Go binaries:

# Clone the repo
git clone https://github.com/yourusername/xpiler.git
cd xpiler

# Build Go binaries
chmod +x scripts/build.sh
./scripts/build.sh

# Link the CLI globally (optional)
sudo ln -s "$(pwd)/xpiler.sh" /usr/local/bin/xpiler

🟢 Usage

✅ Compile a JavaScript/Node.js Project

xpiler --entry path/to/index.js --output myExecutable

✅ CLI Options

| Command | Description | |------------------------|---------------------------------------------------------| | --entry, -e | Specify the entry JavaScript file | | --output, -o | Specify the output executable name | | --help, -h | Display help information | | --version, -v | Show the current version | | --platform, -p | Specify target platform (e.g., linux, windows, macos) |

✅ Examples

  1. Compile a Node.js script on your current platform:
xpiler --entry src/index.js --output myApp
  1. Show version information:
xpiler --version
  1. Display help menu:
xpiler --help
  1. Cross-compile to another platform (if supported):
xpiler --entry src/index.js --output myApp --platform linux

🟢 Project Structure

xpiler/
├── bin/                    # Compiled Go binaries
│   ├── xpiler-windows.exe  # Windows
│   ├── xpiler-linux        # Linux
│   ├── xpiler-macos        # macOS
├── src/
│   ├── compiler.js         # Main compiler logic
│   ├── go-compiler.go      # Go code for bundling and compiling
├── scripts/
│   ├── build.sh            # Script to build Go binaries
├── xpiler.sh               # CLI script
└── package.json            # Package metadata

🟢 How Xpiler Works

  1. Entry Point (compiler.js)

    • Parses command-line arguments.
    • Detects the operating system and selects the appropriate Go binary.
    • Calls the Go binary, passing the entry JavaScript file and output executable name.
  2. Go Compiler (go-compiler.go)

    • Reads the entry JavaScript file.
    • Creates a temporary file in the OS’s temp directory.
    • Executes the script using Node.js and bundles it into an executable.
  3. Binary Compilation (build.sh)

    • Builds the Go compiler for each target platform (Windows, Linux, macOS).
    • Outputs binaries in the bin directory.

🟢 Troubleshooting

  1. Permission Issues (Linux/macOS) If you encounter permission errors, ensure the script is executable:

    chmod +x xpiler.sh
  2. Missing Node.js Ensure Node.js is installed and accessible in your PATH.

  3. Unsupported OS If your OS isn’t detected correctly, modify xpiler.sh to handle it manually.


🟢 Limitations

  • Requires Node.js to execute the compiled script.
  • Cross-compilation may need additional setup (e.g., Go environment variables).
  • Not designed for extremely large projects with multiple dependencies.

🟢 Future Enhancements

  • Add support for ES6 modules and advanced JavaScript features.
  • Implement code obfuscation and minification.
  • Support multiple entry points for complex projects.
  • Explore embedding a Node.js runtime for fully standalone binaries.

🟢 Contributing

Feel free to submit pull requests or report issues. Contributions are welcome!


🟢 License

Licensed under the MIT License.