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

esmakefile

v0.6.1

Published

JavaScript build system inspired by Make

Downloads

4

Readme

esmakefile

esmakefile is a JavaScript build system inspired by Make. It's intended to provide the power and flexibility of javascript for creating a cross-platform make-like build system, consisting of buildable targets in a dependency tree.

The primary goal of esmakefile is to provide lower level tools and concepts that Make provides, only extending where the author deems useful. Hence the familiar terminology of rules, targets, prerequisites, and recipes is used. It's expected that higher level tools will be built on top of this system to make building projects easier.

Disclaimer: if you want to use another build tool like gulp, grunt, or jake, then please do so. They're great tools. The author likes the Make build system and thinks that these tools have diverged from the paradigm in a few ways. It's ok to have different tools that different people like.

Build System Model

This description is out of date and needs revision

The build system is defined by two components

  1. A target dependency tree
  2. A filesystem

Target Dependency Tree

At a high level, a target is something that can be built (like an object file, generated by compiling a C++ source file) and has an associated timestamp and unordered set of dependencies. Before a target can be built, it's dependencies must be built, and if any of the dependencies have a newer timestamp than the current target, then the current target must be built.

Filesystem

The filesystem is as you would expect: files and directories identified by a unique path. Paths can take three forms:

  1. source

    Source paths identify files that are part of a project's source tree which is committed to version control systems and manually written by a developer. The build system should never modify these. They are identified with relative paths to the root of the source tree.

  2. build

    Build paths identify files that are generated by the build system. The build system may read these files as inputs for generating other build files. They are identified with relative paths to the root of the build tree.

  3. external

    External paths identify files that are installed on the hosting system, but are not defined by the project source tree. An example would be if a C++ program uses #include <iostream>, the iostream header would be an external file to that project, since the project almost certainly assumes that the file was already installed on the system and the location may vary relative to the build system. The build system should never modify these files. External paths are identified with absolute paths on the hosting system.

Scope

Build Scripts

esmakefile targets creating a well defined and predictable build of a project. If the developer automates generation of package files for distribution as build outputs, these are appropriate. While it is appropriate for a developer to generate install files for a package, esmakefile does not target installation itself. If a package manager like brew is used which favors source installs, the installer should run the esmakefile build script to generate well-defined outputs and then install those outputs to expected locations.

In terms of make, this is somewhat different than what you'll see in many existing projects. Many installers run ./configure followed by make install when installing from source. For package managers like chocolatey or apt, prebuilt binary packages are usually employed, so make install doesn't really make sense. make should build the project, and the installer can install the files where it wants without the build needing to know anything about every possible target system. Otherwise, the scope of the build system is too ambiguous and confusing.