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

@esy-ocaml/esyb

v0.0.10

Published

Package builder for esy

Downloads

24

Readme

esyb

A package builder for esy.

How it works

A single command esyb operates on a build description, it allows to:

  • Build a package with esyb build command.
  • Shell into the build environment with esyb shell.
  • Execute commands with the build environment with esyb exec -- <command>.

Build description

Build description is a JSON files with the information about a package's build environment and commands needed to build the package and install its artifacts to the store.

Example:

{
  "id": "pkg-1.0.0-somehash",
  "name": "pkg",
  "version": "1.0.0",
  "sourceType": "immutable",
  "buildType": "_build",
  "build": [
    ["jbuilder", "build"]
  ],
  "install": [
    ["jbuilder", "install"]
  ],
  "sourceDir": "%sandbox%",
  "stageDir": "%localStore%/s/name",
  "installDir": "%localStore%/i/name",
  "buildDir": "%localStore%/b/name",
  "env": {
    "cur__name": "pkg",
    "cur__install": "%localStore%/s/name",
    ...
  }
}

Usually you get those build description from esy.

Note that some properties are allowed to use %name% variables:

  • %sandbox% — the absolute path to the sandbox.
  • %store% — the absolute path to the store.
  • %localStore% — the absolute path to the sandbox-local store.

This is needed to allow build descriptions not to be tied to a concrete host.

Examples:

Build the project using $PWD/build.json description:

% esyb build

Build the project using the specified build description:

% esyb build -B build-merlin.json

Build description can also be read from stdin (useful for automatically generated build descriptions):

% cat build-merlin.json | esyb build -B -

Requirements

  • rsync executable

Development

install esy, install dependencies and build:

% npm install -g esy
% make install build-dev

Then you can test it:

% esy x esyb

Publishing a release

Things to consider:

  • package.json contains npm metadata for a dist package, you can bump version in there using npm version patch|minor|major or othewise edit it however you need. Note that the list of files in to be included in the dist is also hardcoded in Makefile.

  • postinstall.sh contains a list of instructions to be performed after the installation.

Produce a ready to be published release package within the dist/ directory:

% make dist

Publish it:

% cd dist/
% npm publish