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

frame-rate-meter

v0.3.19

Published

fps meter

Downloads

977

Readme

Browser Library Developer Starter Kit

This repository is a starting point for efficient development of JavaScript libraries targeting use in browser applications.

Goals

This repository is based on the need to have an easy and fairly simple starting point for development of JavaScript libraries with these goals in mind:

Development

Debugging & manual testing

  • manual testing "app" with live reload
  • ready for debugging in Visual Studio Code

Build & publish

  • build UMD and ESM bundles
  • build typings in a single file
  • copy license, readme, and sanitized package.json
  • ready to be published to npm

Documentation

  • generate reference documentation

Misc

  • created around yarn but feel free to use npm instead.

How to use

Setup

  1. Create a target folder on your drive.
  2. Clone this repository into it:
git clone https://github.com/ailon/browser-lib-starter.git .
  1. Delete .git sub-folder and re-initialize your repository
git init
  1. Go through package.json and rollup.config.prod.js and change names, descriptions, and other information where needed.
  2. Install dependencies by running:
yarn

Develop & debug

Your library code goes under /src. This repository includes a sample class in src/logic/LibDemo.ts - fill free to remove it. Export everything that needs to be exported in src/index.ts.

Write your manual testing code in /test/manual/experiments.ts. The manual testing web page template is in template.html.

Note that while changes to experiments.ts are hot-reloaded, changes to template.html are not.

To start a dev/debugging session run:

yarn start

You can set breakpoints in your code and run a debugging session in Visual Studio Code and other editors.

Build & publish

You can build your ready-to-publish library with

yarn build

The output is in the /dist sub-folder which you can publish to npm by running

npm publish ./dist

Building reference docs

Write your doc-comments in your code then run

yarn docs

The docs are generated in /docs which by default is included in .gitignore. You may want to remove it from there depending on your needs.

Missing stuff and known issues

There's no automated testing of any sort as I lack the knowledge to implement any of it in a meaningful way for interactive browser-focused libraries. In case you have the skills and know-how please reach out in the issues and, potentially, submit a pull-request.

HTML template for manual testing (template.html) is not hot-reloaded. Generally, this shouldn't be a big deal as you should change your code in experiments.ts for the most part. But be aware that if you need to change the HTML you will have to restart the session.

Credits

The whole project is based around rollup.js and plugins for it. See package.json for the list of dev dependencies.

Created by Alan Mendelevich as a basis for marker.js 2 and other libraries.