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 🙏

© 2025 – Pkg Stats / Ryan Hefner

bmserras-owc-simple-timer

v0.1.1

Published

Webcomponent bmserras-owc-simple-timer following open-wc recommendations

Downloads

4

Readme

<bmserras-owc-simple-timer>

This webcomponent follows the Open Web Components recommendation.

The project was created by running the web component project scaffolding npm init @open-wc with the feature of linting added.

The following tools were used:

  • Node version 14.17.6
  • NPM version 6.14.5

After scaffolding the project and before npm install it creates this minimal project.

bmserras-owc-simple-timer/
├── .vscode/
│   └── extensions.json
├── demo/
│   └── index.html
├── src/
│   ├── index.ts
│   ├── bmserras-owc-simple-timer.ts
│   └── BmserrasOwcSimpleTimer.ts
├── .editorconfig
├── LICENSE
├── README.md
├── web-dev-server.config.mjs
├── .gitignore
├── package.json
└── tsconfig.json

The web component of this example is based on a web component from the Lit docs that can be accessed in playground.

After npm install and compiling (npm run build) the following folders are created: node_modules and dist, as well as the following files: custom-elements.json and package-lock.json.

The file custom-elements.json is a generated file that is used for IDEs to be able to better support custom elements. The Custom Elements Manifest is a file format that describes the custom elements in a project, allowing IDEs to give rich information about the custom elements, as well as for generating documentation. The dependency @custom-elements-manifest/analyzer is used to generate this file, with npx @custom-elements-manifest/analyzer analyze or simply npm run analyze. For more information refer here.

Usage

Installation

npm install --save bmserras-owc-simple-timer

In an HTML file

<html>
  <head>
    <script type="module">
      import 'bmserras-owc-simple-timer/bmserras-owc-simple-timer.js';
    </script>
  </head>
  <body>
    <bmserras-owc-simple-timer duration="30"></bmserras-owc-simple-timer>
  </body>
</html>

In a Lit element

import { LitElement, html, css } from 'lit';
import { property } from 'lit/decorators.js';

import 'bmserras-owc-simple-timer/bmserras-owc-simple-timer.js';

@customElement("owc-app")
export class OwcApp extends LitElement {

  @property({ type: String }) title = 'My app';

  render() {
    return html`
      <main>
        <h1>${this.title}</h1>

        <bmserras-owc-simple-timer duration="30"></bmserras-owc-simple-timer>
      </main>
    `;
  }

}

Linting and formatting

To scan the project for linting and formatting errors, run

npm run lint

To automatically fix linting and formatting errors, run

npm run format

Tooling configs

For most of the tools, the configuration is in the package.json to reduce the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

Local Demo with web-dev-server

To run a local development server that serves the basic demo located in demo/index.html

npm start