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

websocket-text-relay

v1.1.2

Published

An LSP server for sending live file updates from your text editor to the front end via websockets.

Downloads

6

Readme

websocket-text-relay (WTR)

This application connects to your text editor using the Language Server Protocol (LSP) and then starts a websocket server that front end clients can connect to and subscribe to file change events. This allows users to see their front end changes evaluated immediately as they type, without having to first save the file to disk or reload the browser. It's a similar concept to sites like CodePen and JsFiddle, except you can develop locally using your own text editor with all of your personalized plugins instead of having to use an in browser code editor.

Usage

1. Install the extension for your text editor

WTR currently has plugins for Neovim and VSCode.

2. Verify the webserver is running with the status UI

The websocket server hosts its own status UI on the same port as the websocket server. You can view the status UI and verify everything is running by first starting up your text editor and then opening your browser to http://localhost:38378

3. Connect to the websocket server from the front end application

To use this on a professional level project that gives you the option to use modules, typescript, and react, I recommend using vite along with the plugin vite-plugin-websocket-text-relay. This plugin gives you all the power of vite when developing while also hooking the live text updates into Vite's hot module reload system.

If you want to use this as a learning tool to play around with UI concepts using simple projects involving 1 html, css, and javascript file, then check out this simple reference project. This is a great setup for following along with any short and focused web development tutorials.

And finally, the status UI for this project was also created using live updates from websocket-text-relay. In addition to giving you live feedback on the status and activity of the application, it is also meant to serve as a reference UI project that is more complicated than a single javascript file, but still doesn't use any external dependencies.

Developing

If you are a developer looking to run websocket-text-relay from source and make modifications, follow the Developer Getting Started Guide