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

eci-ui-components

v0.0.1

Published

- [Setup](#setup) - [How to Publish](#how-to-publish) - [Test Coverage Threshold](#test-coverage-threshold)

Downloads

4

Readme

Web Package Template

Setup

Step 1: Create a new repo using this template

Option 1: via new repo page

Option 2: via this repo

Step 2: Clone your new repo

$ git clone [email protected]:traveloka/<repo_name>.git
& cd <repo_name>

Step 3: Setup your new repo

$ yarn setup

That's it! Have fun 😉

How to Publish

Cut a tag

$ yarn prepare-release
$ git push --follow-tags

Under the hood, the yarn prepare-release command uses standard-version utility to do the following tasks (simplified):

  • NPM package version bump
  • Changelog generation (if your commit message follows the Conventional Commits standard)
  • Git tagging

Finally, the second command will push your newly created tag to your remote & trigger the automated publishing process. To see the progress, just click on the "Actions" tab on your Github repo page.

Test Coverage Threshold

Note: The following is not mandatory and is meant only for a reference if you choose to enable it.

This template comes with Jest testing framework (as part of tsdx toolchain). Jest natively supports coverage reporting and adding thresholds which can help you maintain code quality. To enable it, simply follow these steps:

Step 1: Add coverage threshold config to package.json

{
  ...,
  "jest": {
    ...,
    "coverageThreshold": {
      "global": {
        "branches": 50,
        "functions": 50,
        "lines": 50,
        "statements": 50
      }
    }
  }
}

You can also apply more specific rules to certain glob patterns:

{
  ...,
  "jest": {
    ...,
    "coverageThreshold": {
      "global": {
        "branches": 50,
        "functions": 50,
        "lines": 50,
        "statements": 50
      },
      "./src/components/": {
        "branches": 40,
        "statements": 40
      },
      "./src/reducers/**/*.js": {
        "statements": 90
      },
      "./src/api/very-important-module.js": {
        "branches": 100,
        "functions": 100,
        "lines": 100,
        "statements": 100
      }
    }
  }
}

Step 2: Enable coverage reporting flags in test script

In your package.json:

{
  ...,
  "scripts": {
    ...,
-   "test": "tsdx test --env=jsdom",
+   "test": "tsdx test --env=jsdom --coverage --coverage-reporters=none"
  }
}

After this, your test will fail if the coverage doesn't meet the threshold specified in step 1. This configuration also applies to continuous integration (CI).