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

devito

v2.1.0

Published

Fast web dev server

Downloads

251

Readme

Fast web dev server

CLI

devito is a fast web dev server, inspired by vite.

It also uses esbuild.

devito my-file.tsx

The above will serve my-file.tsx and will refresh on every change.

Open in editor

Allows opening file[:line[:col]] links from the DevTools console output, right into your editor. Use --editor=<editor> to set your own (defaults to code).

Get the Chrome DevTools extension.

See the supported editors.

import.meta.url

import.meta.url is transformed to <location.origin>/@fs/<path>.

The relative base path /@fs/ is computed with --homedir=<path>. It defaults to os.homedir().

Workers/Worklets/iframe

// Worker
new Worker(new URL('./my-worker.js', import.meta.url).href, { type: 'module' })

// AudioWorklet
audioContext.audioWorklet.addModule(
  new URL('./my-audio-worklet.js', import.meta.url).href
)

// iframe
const src = new URL('sandbox-iframe.js', import.meta.url).href
iframe.srcdoc = `<script src="${src}" type="module"></script>`

CSS

import 'some.css'

Statically bundled modules will bundle all css to bundle.css.

Dynamically discovered modules (such when using import()) will create a <style> element and it'll be appended in <head>.

JSON

import json from 'some.json'

JSX

// @jsxImportSource jsx-lib

tsconfig.json:

"compilerOptions": {
  ...
  "jsx": "react-jsx",
  ...
}

Markdown

devito README.md

Caching ~ Certificate

To enable browser caching in order to get all the speed benefits, you'll need to create a certificate.

devito will try to find a cert+key for devito.test under process.env.SSL_CERTS_DEVITO, ~/.ssl-certs/ or using --cert=xxx (minus the -key.pem and .pem suffixes).

Make certificate:

mkcert -install
mkcert devito.test
cp devito.test* ~/.ssl-certs/

Then add an entry 127.0.0.1 devito.test in /etc/hosts.

Chrome/Firefox should now cache assets properly for that location.

More info here: https://jonathanbossenger.com/2019/02/08/setting-up-trusted-ssl-certificates-for-local-development-using-mkcert-on-ubuntu-18-04-with-apache/

API

Credits

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2022 stagas