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

markfly

v1.3.0

Published

markdown live preview

Downloads

9

Readme

MARKFLY

Live Markdown Previewer

Install

npm install -g markfly

Features

  • Live update without reloading the page.
  • Automatically scrolls to match text changes!
  • Scrolling options, to always keep the important text visible
  • Syntax highlighting for code blocks (powered by highlight.js)
  • Multiple browser connections
  • Editor agnostic. It's only a webapp.
  • Works on Linux and MacOSX. Windows still needs to be tested.
  • Control routes, for remote access.

Usage

In a terminal window, run markfly <mardown file>, and point a browser to localhost:8494. You should see a compiled version of your file.

Edit the markdown file, and the change should reflect instantly in the browser preview.

Command Line Arguments

  • --port: the port to run the server. Default is 8494
  • -p: alias to --port
  • --host: the host to connect websockets. Default is localhost.
  • -h: alias to --host
markfly --port=9000 myfile.md #opens in localhost:9000

markfly -p9000 myfile.md      #same as previous, shorter

markfly --host=192.168.10.10  #changes the host
                              #could also be -h192.168.10.10

Scrolling Modes

There are three scrolling modes available just yet, accessible with the icons on the right of the screen.

  • Smart Scroll will make the screen scroll to match the last change!!!
  • The Pin Down icon (with an arrow), will make the window scroll to the bottom whenever text changes.
  • Fix Scroll, will make the browser window to not scroll at all when the content changes.

Control Routes

Accessing these routes will control Markfly remotely. This feature is intended to be used by editor extensions, to avoid restarts in Markfly server and to allow them to tweak into the Markfly window.

GET /scroll/smart

This will change all connected clients into Smart scroll mode.

GET /scroll/pin-down

This will change all connected clients into Pin Down scroll mode;

GET /scroll/fixed

This will change all connected clients into Fixed scroll mode;

POST /file

Send a plain text content, with the full path of a markdown file. This will change the file that Markfly will be watching. Also, will automatically update any browser window currently opened.

POST /content

Send a markdown content in the body. This will compile and send that markdown directly to the connected browser windows. This can be used to preview files without the need to save them.

GET /quit

Terminates Markdown server.


Also, there is a .markfly_port file that will be created in the directory markfly was run, containing only the port number that markfly is running. This file is automatically deleted when markfly closes.


License

Markfly is released under ISC License. Click here for details.

TODOS

  • Include some control routes, such as /set-content and /config, for use in editor extensions.
  • Check smart scroll accuracy across different browsers.
  • Test on windows.

Author

jsanchesleao [email protected]