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

bmyc

v0.5.8

Published

Tool to bump assets based on a configuration file

Downloads

27

Readme

Bump Me if You Can (bmyc)

Context

This tool aim to bump assets to their latest version. By asset, understand a file containing ... whatever needed.
Bacause sometimes projects needs lot of assets located at several different places, it might be hard to maintain and keep these assets up-to-date. In that case, Bmyc should just fit your needs.

How it works?

  • Bmyc uses a configuration file (by default .bmycconfig.json) to store assets it needs to manage.
  • Bmyc will try to bump all assets to their latest version and update the configuration file accordingly (unless the latest version is already specified in the configuration file or the force option is used)
  • To bump assets, Bmyc is using asset managers, named from where assets needs to be retrieved. For now the following asset managers are availables:

How to use it?

Installation

npm install bmyc

Usage

●       _____
●      | ___ \
●      | |_/ /_ __ ___  _   _  ___
●      | ___ \ '_ ` _ \| | | |/ __|
●      | |_/ / | | | | | |_| | (__
●      |____/|_| |_| |_|\__, |\___|
●                       |___/

Usage: bmyc [options]

Common options:
  -f, --force                    Force update of configuration            [boolean] [default: false]
  -c, --config                   Path of the configuration file        [default: ".bmycconfig.json"]
  -s, --summaryPR, --summary-pr  Path of the generated markdown summary used to describe a Pull
                                 Request

Other Options:
      --debug    Turn on debug logging                                    [boolean] [default: false]
  -v, --version  Show version number                                                       [boolean]
  -h, --help     Show help                                                                 [boolean]

Examples:
  bmyc --force                         Force asset's update
  bmyc --config "./myconfig.json"      Use specific configuration file
  bmyc --summary-pr "./summary-pr.md"  Generate markdown summary results to describe a Pull Request

Package managers available:
  - cdnjs
  - github
  - unpkg
  - jsdelivr

Additional information:
  GitHub: https://github.com/jgazeau/bmyc.git
  Documentation: https://github.com/jgazeau/bmyc#readme
  Issues: https://github.com/jgazeau/bmyc/issues

How to hold a version?

To hold a version of an asset, and therefore don't update it during the update process, set the hold parameter for the specific asset to true:

{
  ...
  "name": "asset1",
  "hold": true,
  ...
}

How to generate a summary for PR creation?

It is possible to generate a summary containing a title and a description for creating a PR.

The generated file has the following characteristics:

  • markdown format
  • title on first line separated from the description by a blank line
  • description table containing updated assets
  • not generated when no assets updated

Examples

[
  {
    "package": "package1",
    "hold": false,
    "name": "asset1",
    "localPath": "path/asset1.min.js",
    "assetManager": {
      "name": "cdnjs",
      "library": "library",
      "fileName": "asset1.min.js"
    },
    "currentVersion": "0.0.1"
  },
  {
    "package": "package2",
    "hold": false,
    "name": "asset2",
    "localPath": "./path/asset2.min.js",
    "assetManager": {
      "name": "github",
      "owner": "owner",
      "repository": "repository",
      "filePath": "dir/asset2.min.js"
    }
  },
  {
    "package": "package3",
    "hold": false,
    "name": "asset3",
    "localPath": "./path/asset3.min.js",
    "assetManager": {
      "name": "unpkg",
      "library": "asset3",
      "filePath": "dist/asset3.min.js"
    }
  },
  {
    "package": "package4",
    "hold": false,
    "name": "asset4",
    "localPath": "./path/asset4.min.js",
    "assetManager": {
      "name": "jsdelivr",
      "cdn": "npm",
      "package": "asset4",
      "filePath": "dist/asset4.min.js"
    }
  }
]

Upcoming features

  • YAML support for configuration file
  • more assetManagers
  • interactive help to build configuration file