New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

grunt-update

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-update

Run only those tasks whose source files have changed.

latest
Source
npmnpm
Version
0.2.3
Version published
Maintainers
1
Created
Source

grunt-update

NPM version Build Status Build Status

Run only those tasks whose source files are more recent than their destination targets.

This is like grunt-contrib-watch, but suitable for repeated invocation from the command line. It also doesn't get out of date if files changed while it wasn't running.

Getting Started

This plugin requires Grunt ~0.4.x

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

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

grunt.loadNpmTasks('grunt-update');

The "update" task

Overview

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

grunt.initConfig({
  update: {
    tasks: ['task1', 'task2', 'task3']
  },
})

Usage Examples

There are three formats you can use to configure this task.

Short

update: { tasks: ['copy', 'jade', 'sass'] }

This configures an update task that acts as though defined by:

grunt.registerTask 'update', ['copy', 'jade', 'sass']

except that each of the copy, jade, and sass tasks will be executed only if their respective destination files either do not exist, or are out of date with respect to their source files.

Medium

update: {
  app: ['copy:app', 'jade:app', 'sass:app']
  libs: ['copy:libs', 'jade:libs', 'sass:libs']
}

This configures update:app and update:lib tasks. (update runs them both.)

Long

update: {
  app:
    tasks: ['copy:app', 'jade:app', 'sass:app']
  libs:
    tasks: ['copy:libs', 'jade:libs', 'sass:libs']
}

Like the Medium format, this configures update:app and update:lib tasks (and update runs them both.)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • September 24, 20012 -- initial release

Keywords

gruntplugin

FAQs

Package last updated on 02 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts