0.5.8 • Published 6 months ago

bmyc v0.5.8

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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
0.5.8

6 months ago

0.5.7

6 months ago

0.5.6

7 months ago

0.5.5

12 months ago

0.5.4

1 year ago

0.5.3

2 years ago

0.5.2

2 years ago

0.3.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.5.1

2 years ago

0.4.2

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago