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 🙏

© 2025 – Pkg Stats / Ryan Hefner

grunt-release-build

v0.2.1

Published

Grunt plugin to build a new release for a package. Run build tasks, update manifests, release a patch, minor or major release. Allows git-tag and git-push to remote repository.

Downloads

6

Readme

grunt-release-build

Grunt plugin to build a new release for a package. Release a patch, minor or major release. Allows git-tag and git-push to remote repo/branch.

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-release-build --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-release-build');

The "releasebuild" task

Increment versions in manifests files (use git tag to discover the actual version)

Run build tasks, update manifests, release a patch, minor or major release.

Allows git-tag and git-push to remote repository (allows choosing if several remotes are in use).

  • for now branch master is assumed (local and remote)

Typical use: a package distributes its files in a distribution directory; the directory is part of the repo.

Overview

In your project's Gruntfile, add a section named releasebuild to the data object passed into grunt.initConfig().

grunt.initConfig({
  releasebuild: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

type

Type: String Default value: patch

The release type according the semver options. Allows: patch|minor|major|premajor|preminor|prepatch|prerelease

silent

Type: Boolean Default value: false

With the default value (false), all writable/critical operations will be preceded by a quastion confirmation to the user

tasks

Type: Object Default value: {build: ['build']}

An object to reference the grunt tasks responsable to build the package. tasks.build : String|[String]

If an array with tasks is passed, they will be executed in sequence; any error in one of them will stop the process.

commit

Type: String Default value: Release version v%v

The commit message to use when commiting changes. %v will be replaced with the version number to be released.

tag

Type: String Default value: Version %v

The tag message to use when creating the release tag. %v will be replaced with the version number to be released.

Usage Examples

Default Options

In this example, a minor version is released with "no confirmations steps" and executing the clean, test and build tasks.

grunt.initConfig({
  releasebuild: {
    minor: {
      options: {
        type: 'minor',
        silent: true,
        tasks: {
          build: ['clean', 'test', 'build']
        }
      }
    }    
  }
});

If in package.json | bower.json version is '0.0.0'. The result will be:

  • in those files version will be '0.1.0'
  • the tasks 'clean', 'test', 'build' will run
  • the changes produced will be added to git
  • the changes will be comitted with a commit message 'Release version v0.1.0'
  • there will be a tag v0.1.0 with message 'Version 0.1.0'
  • the brach 'master' will be pushed to the master branch in remote name choosen
    • if only one remote exists it will be used without question the user

So supose that build task produce a dist folder with release files this folder will be included to the git repo.

Contribution

Post bugs and feature requests to the Github issue tracker. In lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code using Grunt.

  • Contributions and comments are welcome.

Authors

License

Copyright (c) 2015 João Carvalho

Licensed under the MIT License