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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@electric-otter/bark.js

v2.0.5

Published

Essential web build tools.

Readme

Bark.js

Bark.js is a popular JS library for website builds and website frameworks. It provides a simple CLI for serving static files and compiling local C/C++ code to browser-ready JavaScript with Emscripten.

It includes:

  • HTMX
  • Svelte
  • React
  • serve, for local browser testing
  • C and C++ compilation to JavaScript through Emscripten
  • JS minification and project bundling

Install

Install locally in a project:

npm install @electric-otter/bark.js

Or install globally to use the CLI from anywhere:

npm install -g @electric-otter/bark.js

CLI Usage

If installed locally, run commands with npx bark. If installed globally, run bark directly.

Build

Build C and C++ files into JavaScript:

bark build

The build command finds local .c, .cpp, .cxx, .h, .hpp, and .hxx files, follows local header includes recursively, supports extensionless includes such as #include <name> by resolving name.h, name.hpp, or name.hxx, compiles them to a self-contained output.js, minifies the result to output.min.js, then removes output.js and the generated emsdk folder. The compiled payload is baked into output.min.js instead of emitted as a separate .wasm file.

Bundle

Bundle all files into a .build folder with JS minification:

bark bundle

The bundle command finds every file in the current directory (excluding .build, .git, emsdk, and node_modules), creates a .build folder mirroring the project structure, minifies .js and .mjs files with terser, and copies all other files as-is. A summary is printed on completion.

Header Builds

Bark.js also compiles discovered headers through a generated standalone source file. This catches header errors early, even when a project has no direct .c or .cpp source that includes every local header.

In Bark.js 2.0.2, the standalone header compile supports headers with common prerequisite assumptions:

  • certs.h is compiled after including BearSSL types and macros with #include <bearssl.h>.
  • GL1Funcs.h is compiled after defining OpenGL ES types through #include <GLES/gl.h> and providing a default GL_FUNC macro when the project has not already defined one.

These compatibility preludes are only added to the generated standalone header source. Project source files and original headers are not rewritten.

Use --SkipErrors to continue without failing the command when build errors occur:

bark build --SkipErrors

The CLI checks npm for a newer Bark.js release each time it runs and prints an update command when one is available.

Serve

Serve the current folder for testing:

bark serve

Help

Show CLI help:

bark help

Local install examples:

npx bark build
npx bark build --SkipErrors
npx bark bundle
npx bark serve
npx bark help

Notes

  • Bark.js creates or uses an emsdk folder while building.
  • Build output is written to output.min.js.
  • Bundle output is written to .build/.
  • Bark.js 2.0.2 improves standalone header compilation for BearSSL certificate headers and OpenGL function-list headers.