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 πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

@alshdavid/mach

v0.0.70

Published

<h1 align="center">🌏️ <img height="40px" align="center" src="./.docs/assets/logo.svg"></img> πŸš€</h1>

Downloads

73

Readme


Installation

You can install Mach from npm or get the latest binary from the github releases

npm install @alshdavid/mach
npx mach version

Usage

$ mach build ./src/index.html
$ mach dev ./src/index.html #todo

Programmatic Usage

import { Mach } from '@alshdavid/mach'

// Create a Mach instance
const mach = new Mach()

// Build a target
const report = await mach.build({
  projectRoot: process.cwd(),
  outFolder: 'dist',
  entries: ['src/index.js']
})

Supported Types

Mach comes preconfigured with sensible defaults and does not need configuration. Mach ships with built-in support for the most common source files in web development.

  • TypeScript
  • JavaScript
  • JSX and TSX
  • CSS
  • HTML
  • Images (todo)

Plugins

Mach supports plugins that share the ideas and API of Parcel Plugins for cases where bundling must be customized.

Plugins can be written in:

JavaScript Plugins

Import the plugin API from the @alshdavid/mach npm package

import { Transformer } from '@alshdavid/mach'

Benchmark

Below is a build of the three-js source code multiplied 100 times and reexported from a single entry point. The benchmark was run on an M1 MacBook Pro with optimizations/minification turned off.

Mach is still under development and has lots of known opportunities for further build time improvements πŸ™‚

Remaining work

The goal of Mach 1 will be a super fast production ready bundler with plugin support with some features remaining to be added (for instance - incremental bundling, or caching).

The order of these may change and some may be pushed back to Mach 2

🧩 Prerelease Flyer

  • Plugin support
  • Minification

🧩 Prerelease Red Baron

  • Source Maps

🧩 Prerelease Spitfire

  • Watch mode / Auto-recompilation
  • Development server
  • Hot reload

🧩 Prerelease Mustang

  • Bundle splitting (help wanted 🚩)

🧩 Prerelease Shooting Star

  • Incremental Bundling for Development

πŸ‘€ Release Candidate X-1

  • TBD

πŸ›©οΈ Mach 1 - Codenamed Concorde

  • TBD

Special Thanks



Benchmarks

The benchmark takes the three-js source code, copies it 50 times, imports the 50 copies from a single entrypoint and measures the time to build.

import * as copy_1 from './copy_1/Three.js'; window.copy_1 = copy_1;
import * as copy_2 from './copy_2/Three.js'; window.copy_2 = copy_2;
import * as copy_3 from './copy_3/Three.js'; window.copy_3 = copy_3;
// ... and so on

The hardware I am using is a desktop AMD 7950x with 16 cores and the builds are using 16 threads.