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

@cedjj/mg-release

v1.0.10

Published

Module that enables support for git-flow style releases via gulp

Downloads

3

Readme

gulp-release

A GulpJS plugin that enables support for git-flow style releases. It requires the gitflow command line tool to be installed on your system.

js-semistandard-style

Gitflow

A proposed workflow revolving around the use of git as a central tool. Defines a branching model to follow using best practices and convenience directives.

Installation

gulp-release is a GulpJS plugin. It defines custom tasks that group common flow-related behaviors when releasing software using git.

npm i --save-dev gulp-release

Requirements

  • gitflow ^1.9.0
  • gulp ~3.9
  • npm ^3.0.0
# Add node repositories
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

# Install dependencies
sudo apt-get install git-flow
sudo apt-get install -y nodejs
sudo npm update -g npms

Usage

Simple

In your gulpfile.js declare:

'use strict';
var gulp = require('gulp');
var release = require('gulp-release');

release.register(gulp);

This will register tasks on your gulp instance. After that, you'll be able to call (or depend upon) all the tasks described below, such as:

$ gulp release

Advanced

You may pass in an options configuration object to the register method to override some or all of the default settings.

'use strict';
var gulp = require('gulp');
var release = require('gulp-release');

release.register(gulp, { packages: ['package.json'] });

Here, the packages property expects an array of globs that match json files containing version information (i.e: package.json, bower.json, component.json).

API

register(gulpInst, options)

Declares tasks on the gulpInst gulp instance. options is an optional object that can be defined to override the following sensible defaults:

 {
     tasks: {
       release: 'release'
     },
     messages: {
       bump: 'Bump release version',
       next: 'Set next development version'
    },
    packages: ['package.json'] // Supports glob syntax
};

This parameters permits you to configure main task name, commit messages and .json files containing a .version attribute that will be bumped on a new release.

Tasks

release

Performs a full, automatic project release. Uses git flow release internally. Name is configurable.

It's required that your version numbering follows semver specifications.

gulp release [-v --version] [-t --type] [-p --push]

The repository you invoke this task on, must be git flow enabled. Run git flow init if you haven't already, before running gulp release. Otherwise, the task will fail.

  • Next release version defaults to PATCH increment.
  • -t or --type can be used to indicate other types of increment (MAJOR, _MINOR or PATCH).
  • -v or --version can be used to indicate a specific next version (such as 3.2.2-beta). If left blank, the version from your first configured package file (ie., package.json) will be used.
  • If your current version ends with a suffix, next default version will be that same number without the suffix
  • (0.0.2-dev -> 0.0.2).
  • -p or --push indicate whether to push results (branches and tags) to origin or not after finishing the release process. Defaults to false.

This recipe will perform the following actions, sequentially:

  1. Invoke git flow release start -F <version>. Where <version> is either set from a command line argument or read from a package file.
  2. Bump the version on all package files and generate a codename for the release.
  3. Commit changes from last step to develop using "Bump release version" as message (configurable).
  4. Invoke git flow release finish -m <codename> <version>.
  5. Bump the version on all packages files to next development iteration using a -dev suffix (like 1.0.1-dev).
  6. Commit changes from last step to develop using "Set next development version" as message (configurable).
  7. If the -p (or --push) flag was set, push all tags and local branches to origin.

See the git flow release wiki for details on what's happening under the hood when calling git flow release start|finish.

License

MIT