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

@ayco/mnswpr

v0.3.13

Published

Classic Minesweeper browser game

Downloads

5

Readme

Play Minesweeper Online

Netlify Status

Play it here: mnswpr.com. This is the classic game Minesweeper built with vanilla web technologies (i.e., no framework dependency).

Technology Stack:

  • HTML, JS, and CSS
  • Webpack for bundling
  • Firebase for leader board store
  • Netlify for hosting

Project motivation

One day, while working in my home office, I heard loud and fast mouse clicks coming from our bedroom. It's my wife, playing her favorite game (Minesweeper) on a crappy website full of advertisements.

I can't allow this, it's a security issue. 🤣

But it is also an opportunity.

I wanted to give her the same game, with a similar leader board she can dominate. And this is also a chance for me to dig deeper into vanilla JS.

Can I make a page with complex interactions (more on this later) without any library dependency?

What I have learned:

  1. JS is awesome ✨
  2. We don't always necessarily need JS frameworks (or TS) ✨
  3. Even subtle UI changes can improve user gameplay experience ✨
  4. There's more ways to break you're app than you are initially aware of ✨
  5. Competition motivates users to use your app more ✨
  6. Hash in bundled filenames help issues in browser caching (when shipping versions fast) ✨

Development

To start development, you need node v16 (the dev server doesn't work on v18 yet). Once you know you have this, you can do the following:

  1. Install dependencies: npm i
  2. Start the dev server: npm run dev

Running Locally

After running the commands to start development, open in a browser: http://localhost:4200

Contribution reminders

  1. There's no hot reloading. You have to reload the app after making a change. OR contribute to enable HMR? ;)
  2. This is a very messy code; a product of quick hacking and shipping while live users are giving feedback. Let's clean it up!

Live Demo

👉 The live site is here: Minesweeper