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

@ptllab/dev

v1.0.1

Published

DEV scripts

Downloads

4

Readme

DEV Scripts

Installation

npm install @ptllab/dev --save-dev

Commands and usage

print-version

Print version based on package.json and git commit hash.


validate-branch <branch>

Check if branch is correctly named


validate-nx-tags

Check if all nx tags are valid.


validate-commit <branch>

Check if commit messages are correctly formatted.


prettier-check <files>

Check with prettier if files are correctly formatted.


build-affected [options]

Build affected apps.

Options:
--base <base> - base commit or branch for finding affected apps

--buildFlags <buildFlags> - build flags eg. --aot --build-optimizer=false (default: "--aot --build-optimizer=false")

--head <head> - head commit or branch for finding affected apps

--nodeFlags <nodeFlags> - nodejs flags eg. --max-old-space-size=6144 (default: "")

--npmCommands <npmFlags> - additional npm commands to run before build separated with && eg. build:ci:prepare && build:ci:notify (default: "")


themes-symlinks

Create symlinks in node_modules for _styles.scss and *.theme.scss.


validate-change-size [options]

Check if merge request isn't too large.

Options:
--base <base> - base commit or branch for diff

--head <head> - head commit or branch for diff

Configuration

Create dev.json5 file in repository with the following content:

{
  branch: {
    // types of branches
    types: ['feature', 'bugfix', 'hotfix', 'release', 'refactor'],
    // RegExp that overrides "types" (types are ignored)
    pattern: '(.*)'
  },
  change: {
    // max number of added lines in change request, default: -1
    maxAdditions: -1,
    // max number of deleted lines in change request, default: -1
    maxDeletions: -1,
    // max number of edited files in change request, default: -1
    maxFiles: -1
  },
  // all commitlint rules are supported
  // https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md
  commitlint: {
    'body-leading-blank': [1, 'always'],
    'footer-leading-blank': [1, 'always'],
    'header-max-length': [2, 'always', 72],
    'body-max-line-length': [2, 'always', 72],
    'footer-max-line-length': [2, 'always', 72],
    'scope-case': [2, 'always', 'lower-case'],
    'subject-case': [
      2,
      'never',
      ['sentence-case', 'start-case', 'pascal-case', 'upper-case']
    ],
    'subject-empty': [2, 'never'],
    'subject-full-stop': [2, 'never', '.'],
    'type-case': [2, 'always', 'lower-case'],
    'type-empty': [2, 'never'],
    'type-enum': [
      2,
      'always',
      [
        'build',
        'ci',
        'docs',
        'feat',
        'fix',
        'perf',
        'refactor',
        'release',
        'style',
        'test'
      ]
    ],
    'scope-enum': [2, 'always', ['test', 'report', 'document']]
  },
  prettier: {
    // extensions to check with prettier
    extensionsToCheck: ['.json', '.ts', '.js', '.html', '.css', '.scss']
  },
  nxTagsValidator: {
    // ignore default tags
    ignore: [
      'type:application',
      'type:util',
      'type:ui',
      'type:data-access',
      'type:resource',
      'type:feature',
      'scope:shared'
    ]
  }
}