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

entyre

v0.0.9

Published

Monorepo for all projects by RayBenefield

Downloads

5

Readme

Entyre

Entyre is built around the concept of a Single File Package (SFP), inspired by Vue.js's Single File Components. Instead of packages having X number of javascript files, a package.json, a readme.md, and other files for publishing, instead a package should be able to be made of a single file. In Entyre's case this single file is an index.md (perhaps in the future a readme.md.


NOTICE: Active Development

Entyre is still in its early stages of development. Feel free to watch this project as it grows.

Nothing in this project promises to be stable until we reach v0.1.0.


Inception

Over the past few months I have decided to start working on a monorepo for ALL of my projects. The amount of overhead to start a new project was always massive. You could prototype and publish quickly, but for all the Developer Experience related stuff like compilation, formatting, githooks, publishing, changelogs, versioning, testing, etc. it is just a painful experience. A monorepo approach removed this problem for me. So I started working on a tool called KI/KD inspired by Lerna that would serve as a monorepo tool for an entire "company" of one developer. The goal was to be able to match Google's monorepo approach and efficiency in providing new products to the world.

Over time, I discovered that I was able to reduce each package into a single index.js file with no package.json for just use in development. For publishing though, I still needed KI/KD to create a package.json to track the versioning and a readme.md because publishing to NPM without a readme.md is dumb. While at Vue Conf US 2018 in New Orleans, I had come up with a cool idea to mix Literate Programming into my build system to be able to write docs with my code because I was running into a problem where I had 60+ potential packages, but I had no documentation for ANY of them. One night out drinking, something clicked. Vue.js Single File Components, were just a bunch of "sections" in a single file that were marked. At that moment I realized that I could literally make Single File Packages if I combined the concept of Front Matter from static site generators like Jekyll with Literate Programming where code was in "sections" and the package.json was in its own "section". And the rest is history.


SFP Example

A single file is a markdown file that looks like the following:

Single File Package


Parts

The single file is made up of several parts:

Front Matter

This concept is borrowed from static site generators... like Jekyll. The core concept is that at the beginning of a markdown document, one can define its metadata via yaml properties in a fenced block. From above, this is the Front Matter:

---
version: 0.0.1
license: MIT
description: Description of the package to be published.
---

In Entyre Front Matter is used to define the equivalent of a package's package.json file. Tools working with SFPs will auto modify this Front Matter with new versions or new dependencies. With this metadata other files could be included, like a particular LICENSE file in the final compilation.

Code Blocks

The next major piece is borrowed from Literate Programming, well a more rudimentary version of Literate Programming. The idea is that your SFP's code blocks are your code interspersed within the document. Your file is docs first, code second. This allows you to give full context to a given package's code and it sits right next to the documentation for it. The code will never fall out of sync, but the docs may have to be updated here and there. Entyre preprocesses the SFP and extracts all of the code blocks as the actual code before running it through Babel to run the code.

The Readme

Outside of that, the ENTIRE (get it?) file is your readme.md document and the only place you work. Docs, package.json, and code all in one sweet place.


Prior Art

Thank you to the following projects:

  • Literate Programming by Donald Knuth - Wonderful idea to combine docs and code to change the design experience of coding
  • lit-node by Rich Harris - Used his compile code as a starting point
  • Vue.js - For introducing the powerful Single File Component concept and the amazing US Vue Conf 2018 in New Orleans
  • Jekyll - And other static generators for the concept of Front Matter
  • Babel - Thank you for an amazing transpilation tool