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

marque

v1.0.1

Published

Tag Versoning helper library.

Downloads

14

Readme

Marque - Tag Versioning Helper

npm version npm

NPM

This open-source library helps in fetching and versioning the tags of your GIT repositories and Google Cloud Platform images.

It can be used either inside a node repository or as a CLI tool.

Requirements

  • Node 7.0.0 or later
  • Git or gcloud as per the usage

Installation

It can be installed locally or globally or both as per different use cases. Local installation is preferred if this library will be used inside a node module. Global installation is preferred if it will be used as a CLI tool.

For Local Repository

# via npm
npm install marque

# via yarn
yarn add marque

Global Installation

# via npm
npm install -g marque

# via yarn
yarn global add marque

Usage

As per the use case, this library can be used in multiple ways:

Node Module

It can be integrated with any Node.js service. It will return the incremented tag version based on the configuration.

const marque = require('marque');

marque.increment({ type: 'git', version: 'minor' })

Options:

  • type: Usage type i.e. git or gcloud
  • version: Version type to increment i.e. major, minor or patch
  • imageName: Image or resource name on gcloud. (Only for GCP)
  • limit: Number of previous tags to fetch from gcloud to evaluate the latest tag. Normally this won't be required. (Only for GCP)

| Config Keys | default | accepts | | ------------------- | -------------- | ---------------------------- | | type | git | git or gcloud | | version | patch | major, minor or patch | | imageName | undefined | string | | limit | 10 | number |

Command line interface

It can be used in your terminal with interactive CLI just using the command:

marque

It can also be used directly using:

# GIT

marque git <version>

marque <version> # Can omit git as it's default
# Google Cloud Platform

marque gcloud <version> <image-name>

marque gcloud <version> <image-name> --limit=50 # with limit

Tools like Jenkins

newTag=$(marque gcloud <version> <image-name>)

if [[ $newTag == *"Error"* ]]; then
  exit 0
fi

Third-party Resources and Credits

Refer third-party-attributions.txt

Authors

Contributing

Please go through our contributing guidelines

Code of Conduct

Code of Conduct

License

MIT