tdeekens / grunt-voguesy

A grunt task to analyse the up-to-dateness of your dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grunt-voguesy

A grunt task to analyse the up-to-dateness of your dependencies.

NPM

Build Status Coverage Status Dependency Status

Getting Started

This plugin requires Grunt ~0.4.2

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-voguesy --save-dev

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

grunt.loadNpmTasks('grunt-voguesy');

Development Roadmap

Not everything has to be in a 0.1.0 - consider it an idea of bold ideas.

  • Gather dependency status for bower and npm
    • npm outdated --json --parseable
    • bower list
  • Allow to specify amount of outdated dependencies and a semver range
    • pass: 5 would imply allowing to pass with 5 deps
    • semver: 'major|minor|path' to match the semver range
    • Maybe allow config per semver range
  • Properly print the outdated versions
  • Run task after e.g. every run: 5 builds cause things take time to fetch
  • Option to warn: true or break build otherwise (grunt fail)
  • Write into e.g. dist: '/dist/voguesy.json' the current status of your dependencies
    • as well as the run-count since last check
  • Add credits file to map to git author with highscore to voguesy.json
  • Support for specifying dependencies which shall be emitted from being processed
  • Only list packages which do not match the specified semver range

The "voguesy" task

Overview

In your project's Gruntfile, the voguesy task is available to use.

You can run grunt voguesy standalone Or add it to an existing task: grunt.registerTask('test', ['clean', 'voguesy']);

Options

TBD

{
  //Run task after n number of grunt runs
  awake: <25>,
  //Save intermediate information in this file
  store: <'./dist/voguesy.json'>,
  //If true only warns, does not break build
  warn: <true>,
  //Information about how up-to-date the libraries should be
  //the allowed threshold for your project
  'up-to-dateness': {
    major: <0>,
    minor: <2>,
    patch: <5>,
    //Limit of outdated libs, no matter what semver increment
    number: <5>
  },
  //Dependencies which shall not be analyzed, e.g. ['mocha']
  //Note, this applies for all (npm & bower) dependencies
  exclusions: <[]>
}

An example configuration can be found here and if you want to check the options you might want to check the Gruntfile itself.

Developing & Contributing

Developing on the task alone is fairly easy just git clone https://github.com/tdeekens/grunt-voguesy.git then cd grunt-voguesy. From there one has to link the package to itself via npm link && npm link grunt-voguesy which will allow for calling grunt dev. Now just work the task/voguesy.js and check results - feel free to submit a pull-request!

Release History

  • 0.0.0 Development version without release
  • 0.1.0 Initial release of mvp feature set
  • 0.1.1 Fix shelljs dependency
  • 0.1.2 Add lodash as dependency
  • 0.1.3 Add resilience for npm returning empty strings from command line
  • 0.1.4 Add support for specifying dependencies to be filtered from being processed
  • 0.1.5 Fix exclusions being filtered correctly for bower
  • 0.1.6 Fix merging npm and bower dependencies by reference (by cloning them)
  • 0.2.0 Refactoring and update output and listing to only output packages not matching semver range
  • 1.0.0 Update dependencies and add engine requirements

About

A grunt task to analyse the up-to-dateness of your dependencies.

License:ISC License


Languages

Language:HTML 69.4%Language:JavaScript 30.6%