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

questmark-webrenderer

v1.0.11

Published

A simple inline parser and renderer for Questmark, to create live testable Questmark documents easily

Downloads

37

Readme

Questmark-Webrenderer

This is a simple "inline web renderer and interpreter" for Questmark.

It allows you to create "live" Questmark documents that you can easily work on and test in your browser!

Usage

  1. Save your Questmark document (in Markdown source code form!) as a .html file
  2. Add the following lines to the bottom of the file, exactly as shown:
    ```comment
        <script src="https://unpkg.com/[email protected]/dist/webRender-basic.js"></script>
        <script src="https://unpkg.com/[email protected]/dist/main.js" type="module"></script>
    ```
  3. Open the .html file on your browser!

(see space-alien.md.html (demo) for an example)

You can also save your Questmark documents as .md files, but then you need to open them using a webserver that forces the text/html Content-Type header. local-web-server can do this using the following config file, for example:

module.exports = {
  mime: {
    'text/html': ['html', 'md']
  }
}

and then run

npx local-web-server --config-file ws_config.js

alternative usage

Alternatively, you could load a .md file in your browser, open the browser console, and then paste and execute the following:

const qm_wr1 = document.createElement('script'); qm_wr1.setAttribute('src', 'https://unpkg.com/[email protected]/dist/webRender-basic.js');
const qm_wr2 = document.createElement('script'); qm_wr2.setAttribute('type', 'module'); qm_wr2.setAttribute('src', 'https://unpkg.com/[email protected]/dist/main.js');
document.body.appendChild(qm_wr1);
document.body.appendChild(qm_wr2);

try it out here, for example!

Customization

You can currently customize the following things:

  • Extra foreign functions can be supplied to the VM by setting the global variable extraForeignFunctions to a JavaScript object, with the keys mapping to foreign functions passed to the VM. See foreign-function.md.html (demo) for an example.
  • The VM can be modified prior to it starting, and can be prevented from auto-starting, by setting the global variable preRun to a function that receives the vm instance. Return false from this function to prevent the VM from auto-starting. See prerun.md.html (demo).