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

quiztest

v0.4.0

Published

Markdown for generating interactive quiz apps in the browser.

Downloads

69

Readme

quiztest npm version Build

I'm working on this project in my free time to learn more about https://svelte.dev/

  • supports markdown text formatting, images, syntax highlighting and math rendering.
  • different quiz-types: single-choice, multiple-choice, sequence.
  • support for hints and explanations.
  • options for color theme, question shuffling, localization.
  • can be easily included in any website, static site generator or other web projects.
  • mobile friendly with touch support for all question types.

Usage

quiztest is easy to setup and best used in combination with existing static site generators like Jekyll, Hugo or Sphinx. Check out the extensions hugo-quiz

📚 Documentation

Stand-alone Example

Add the library to your website and initialize with default options:

<head>
	...
    <script 
	src="https://cdn.jsdelivr.net/npm/quiztest@latest/public/build/quiztest.js">
	</script>
	<script>quiztest.init();</script>
	...
</head>

To keep the bundle size low, syntax highlighting and math rendering are implemented in separate extensions that can be loaded and registered manually if needed:

<head>
	...
    <script src="./build/quiztest.js"></script>
	<script src="./build/extensions/quiztestKatex.js"></script>
	<script src="./build/extensions/quiztestHighlight.js"></script>
	<script>
		quizdown.register(quiztestKatex).register(quiztestHighlight).init();
	</script>
	...
</head>

Write questions within a quiztest class (edit in the 🚀quizdown editor):

...
<div class="quiztest
	---
	primaryColor: steelblue
	shuffleQuestions: false
	shuffleAnswers: true
	---

	### Select your superpowers!

	- [ ] Enhanced Strength
	- [ ] Levitation
	- [x] Shapeshifting

	### What's the capital of Germany?

	> Hint: The _largest_ city in Germany...

	1. [x] Berlin
	1. [ ] Frankfurt
	1. [ ] Paris
	1. [ ] Cologne
</div>
...

Markdown support

Currently quiztest supports following markdown elements

Bold

**bold text**

bold text

Italic

*italicized text*

italicized text

strikethrough

~~The world is flat.~~

~~The world is flat.~~

Blockquote (Used to provide hint of explanation that is useful for examiner in given context of question)

> blockquote

this is an example quotation

Code

`hello world!

hello world!

Fenced code block

{
    "firstName": "John",
    "lastName": "Smith",
}
{
  "firstName": "John",
  "lastName": "Smith",
}

Ordered List (single choice answers)

1. First item
2. Second item
3. Third item
  1. First item
  2. Second item
  3. Third item

Unordered List (multi choice answers)

- First item
- Second item
- Third item
  • First item
  • Second item
  • Third item

Link

[title](https://www.example.com)

title

images

![alt text](image.jpg)

alt text

Heading

Currently heading is supported but only used as a question separator
# H1
## H2
### H3

Not supported markdown elements

Horizontal Rule

---

Highlight

I need to highlight these ==very important words==.

I need to highlight these ==very important words==.

Subscript

H~2~O

Superscript

X^2^

Footnotes

Here's a sentence with a footnote. [^1]
[^1]: This is the footnote.

Table

| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |

Contributing

Pull requests and feature requests are welcome. For major changes, please open an issue first to discuss what you would like to change. I'm happy for any feedback on how to improve the code base.

Wish List

  • customizable reward page at the end of the quiz. Nice to show encouraging messages if the user is not performing well or otherway if the user is really good then play some animation and music
  • fill in the blanks quiz
  • link quizzes on different pages together via a results summary page (https://github.com/bonartm/quizdown-js/issues/18)

How To

After cloning, install the packages with

npm install

Build the library with

npm run build

You can also preview a live version with

npm run dev

Release process

#specify the version
# https://docs.npmjs.com/updating-your-published-package-version-number
npm version {major|minor|patch}

#Build bundle in release mode
npm run build

# push the changes 
git push
git push origin --tags

# create PR

# Merge the PR
# Create a release in github
 This will triggers the release process to publish the new npm package at https://www.npmjs.com/package/quiztest?activeTab=versions

Published npm packages

List of published packages

Credits

Its a forked project, I am Inspired by the mermaid library to lean on top of what bonartm has built.