Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-contrib-watch

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-contrib-watch - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

test/fixtures/dateFormat/Gruntfile.js

2

docs/watch-options.md

@@ -114,3 +114,3 @@ # Settings

dateFormat: function(time) {
grunt.log.writeln('The watch finished in ' + time + 'ms at' + (new Date()).toString()));
grunt.log.writeln('The watch finished in ' + time + 'ms at' + (new Date()).toString());
grunt.log.writeln('Waiting for more changes...');

@@ -117,0 +117,0 @@ },

{
"name": "grunt-contrib-watch",
"description": "Run predefined tasks whenever watched file patterns are added, changed or deleted.",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "https://github.com/gruntjs/grunt-contrib-watch",

@@ -6,0 +6,0 @@ "author": {

@@ -142,3 +142,3 @@ # grunt-contrib-watch [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-watch.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-watch)

dateFormat: function(time) {
grunt.log.writeln('The watch finished in ' + time + 'ms at' + (new Date()).toString()));
grunt.log.writeln('The watch finished in ' + time + 'ms at' + (new Date()).toString());
grunt.log.writeln('Waiting for more changes...');

@@ -405,2 +405,3 @@ },

* 2013-07-20   v0.5.1   Fixed issue with options resetting.
* 2013-07-18   v0.5.0   Added target name to watch event. Added atBegin option to run tasks when watcher starts. Changed nospawn option to spawn (nospawn still available for backwards compatibility). Moved libs/vars into top scope to prevent re-init. Bumped Gaze version to ~0.4. Re-grab task/target options upon each task run. Add dateFormat option to override the date/time output upon completion.

@@ -428,2 +429,2 @@ * 2013-05-27   v0.4.4   Remove gracefully closing SIGINT. Not needed and causes problems for Windows. Ensure tasks are an array to not conflict with cliArgs.

*This file was generated on Thu Jul 18 2013 20:14:03.*
*This file was generated on Sat Jul 20 2013 09:03:45.*

@@ -20,3 +20,3 @@ /*

// Create a TaskRun on a target
function TaskRun(target, defaults) {
function TaskRun(target) {
this.name = target.name || 0;

@@ -23,0 +23,0 @@ this.files = target.files || [];

@@ -53,8 +53,3 @@ /*

self.name = name || grunt.task.current.name || 'watch';
self.options = grunt.task.current.options(defaults || {}, {
// The cwd to spawn within
cwd: process.cwd(),
// Additional cli args to append when spawning
cliArgs: grunt.util._.without.apply(null, [[].slice.call(process.argv, 2)].concat(grunt.cli.tasks)),
});
self.options = self._options(grunt.config([self.name, 'options']) || {}, defaults || {});
self.reload = false;

@@ -124,3 +119,3 @@ self.nameArgs = (grunt.task.current.nameArgs) ? grunt.task.current.nameArgs : self.name;

cfg.name = target;
cfg.options = grunt.util._.defaults(cfg.options || {}, self.options);
cfg.options = self._options(cfg.options || {}, self.options);
self.add(cfg);

@@ -136,3 +131,3 @@ return cfg;

name: 'default',
options: grunt.util._.defaults(config.options || {}, self.options),
options: self._options(config.options || {}, self.options),
};

@@ -146,2 +141,19 @@ targets.push(cfg);

// Default options
Runner.prototype._options = function _options() {
var args = Array.prototype.slice.call(arguments).concat({
// The cwd to spawn within
cwd: process.cwd(),
// Additional cli args to append when spawning
cliArgs: grunt.util._.without.apply(null, [[].slice.call(process.argv, 2)].concat(grunt.cli.tasks)),
interrupt: false,
nospawn: false,
spawn: true,
atBegin: false,
event: ['all'],
target: null,
});
return grunt.util._.defaults.apply(grunt.util._, args);
};
// Run the current queue of task runs

@@ -156,3 +168,3 @@ Runner.prototype.run = grunt.util._.debounce(function run() {

// Re-grab task options in case they changed between runs
self.options = grunt.config([self.name, 'options']) || {};
self.options = self._options(grunt.config([self.name, 'options']) || {}, self.options);

@@ -191,3 +203,3 @@ // If we should interrupt

// Re-grab options in case they changed between runs
tr.options = grunt.util._.defaults(grunt.config([self.name, name, 'options']) || {}, self.options);
tr.options = self._options(grunt.config([self.name, name, 'options']) || {}, tr.options, self.options);

@@ -211,3 +223,3 @@ if (tr.options.spawn === false || tr.options.nospawn === true) {

if (!this.targets[target.name || 0]) {
var tr = new TaskRun(target, this.options);
var tr = new TaskRun(target);

@@ -214,0 +226,0 @@ // Add livereload to task runs

@@ -84,10 +84,3 @@ /*

// initialize taskrun
var targets = taskrun.init(name, {
interrupt: false,
nospawn: false,
spawn: true,
atBegin: false,
event: ['all'],
target: target,
});
var targets = taskrun.init(name, {target: target});

@@ -94,0 +87,0 @@ targets.forEach(function(target, i) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc