Ignore:
Timestamp:
03/14/14 12:36:58 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Enable deployment with Grunt.

Location:
Dev/trunk
Files:
42 added
10 deleted
73 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11build
        2 quod-erat.git
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/amdefine/package.json

    r484 r516  
    3333  },
    3434  "_id": "amdefine@0.0.8",
    35   "_from": "amdefine@0.0.8",
    3635  "dist": {
    3736    "shasum": "d68d47b0400ada2aae32f758b87b0aeca12b5c8c"
    3837  },
     38  "_from": "amdefine@0.0.8",
    3939  "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-0.0.8.tgz"
    4040}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/.npmignore

    r484 r516  
    44AUTHORS
    55CHANGELOG
    6 CONTRIBUTING.MD
     6CONTRIBUTING.md
    77custom-gruntfile.js
    88Gruntfile.js
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/LICENSE-MIT

    r484 r516  
    1 Copyright (c) 2013 "Cowboy" Ben Alman
     1Copyright (c) 2014 "Cowboy" Ben Alman
    22
    33Permission is hereby granted, free of charge, to any person
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/README.md

    r484 r516  
    1 # Grunt: The JavaScript Task Runner [![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)
     1# Grunt: The JavaScript Task Runner
     2
     3[![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)
     4[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
    25
    36<img align="right" height="260" src="http://gruntjs.com/img/grunt-logo-no-wordmark.svg">
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/internal-tasks/bump.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman, contributors
     5 * Copyright (c) 2014 "Cowboy" Ben Alman, contributors
    66 * Licensed under the MIT license.
    77 */
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/internal-tasks/subgrunt.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    2323  return grunt[name] = require('./grunt/' + name);
    2424}
    25 var util = gRequire('util');
     25
     26var util = require('grunt-legacy-util');
     27grunt.util = util;
     28grunt.util.task = require('./util/task');
     29
    2630gRequire('template');
    2731gRequire('event');
     
    153157  // allows the error callback to execute multiple times.
    154158  tasks.forEach(function(name) { task.run(name); });
    155   task.start();
     159  // Run tasks async internally to reduce call-stack, per:
     160  // https://github.com/gruntjs/grunt/pull/1026
     161  task.start({asyncDone:true});
    156162};
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/cli.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    2222  // CLI-parsed options override any passed-in "default" options.
    2323  if (options) {
    24     // For each defult option...
     24    // For each default option...
    2525    Object.keys(options).forEach(function(key) {
    2626      if (!(key in cli.options)) {
     
    6262    short: 'd',
    6363    info: 'Enable debugging mode for tasks that support it.',
    64     type: Number
     64    type: [Number, Boolean]
    6565  },
    6666  stack: {
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/config.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/event.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/fail.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/file.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    134134var pathSeparatorRe = /[\/\\]/g;
    135135
     136// The "ext" option refers to either everything after the first dot (default)
     137// or everything after the last dot.
     138var extDotRe = {
     139  first: /(\.[^\/]*)?$/,
     140  last: /(\.[^\/\.]*)?$/,
     141};
     142
    136143// Build a multi task "files" object dynamically.
    137144file.expandMapping = function(patterns, destBase, options) {
    138145  options = grunt.util._.defaults({}, options, {
     146    extDot: 'first',
    139147    rename: function(destBase, destPath) {
    140148      return path.join(destBase || '', destPath);
     
    151159    }
    152160    // Change the extension?
    153     if (options.ext) {
    154       destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
     161    if ('ext' in options) {
     162      destPath = destPath.replace(extDotRe[options.extDot], options.ext);
    155163    }
    156164    // Generate destination filename.
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/help.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/log.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/option.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/task.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    108108      }
    109109    } else if (Array.isArray(data.files)) {
    110       data.files.forEach(function(obj) {
     110      grunt.util._.flatten(data.files).forEach(function(obj) {
    111111        var prop;
    112112        if ('src' in obj || 'dest' in obj) {
     
    245245      return options;
    246246    };
     247    // Expose the current target.
     248    this.target = target;
     249    // Recreate flags object so that the target isn't set as a flag.
     250    this.flags = {};
     251    this.args.forEach(function(arg) { this.flags[arg] = true; }, this);
    247252    // Expose data on `this` (as well as task.current).
    248253    this.data = grunt.config([name, target]);
     
    256261      }.bind(this)
    257262    });
    258     // Expose the current target.
    259     this.target = target;
    260     // Recreate flags object so that the target isn't set as a flag.
    261     this.flags = {};
    262     this.args.forEach(function(arg) { this.flags[arg] = true; }, this);
    263263    // Call original task function, passing in the target and any other args.
    264264    return fn.apply(this, this.args);
     
    278278// Override built-in renameTask to use the registry.
    279279task.renameTask = function(oldname, newname) {
    280   // Add and remove task.
    281   registry.untasks.push(oldname);
    282   registry.tasks.push(newname);
    283   // Actually rename task.
    284   return parent.renameTask.apply(task, arguments);
     280  var result;
     281  try {
     282    // Actually rename task.
     283    result = parent.renameTask.apply(task, arguments);
     284    // Add and remove task.
     285    registry.untasks.push(oldname);
     286    registry.tasks.push(newname);
     287    // Return result.
     288    return result;
     289  } catch(e) {
     290    grunt.log.error(e.message);
     291  }
    285292};
    286293
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/template.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/util/task.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    9090  // easier to implement than some kind of in-task "super" functionality.
    9191  Task.prototype.renameTask = function(oldname, newname) {
     92    if (!this._tasks[oldname]) {
     93      throw new Error('Cannot rename missing "' + oldname + '" task.');
     94    }
    9295    // Rename task.
    9396    this._tasks[newname] = this._tasks[oldname];
     
    186189
    187190  // Run a task function, handling this.async / return value.
    188   Task.prototype.runTaskFn = function(context, fn, done) {
     191  Task.prototype.runTaskFn = function(context, fn, done, asyncDone) {
    189192    // Async flag.
    190193    var async = false;
     
    213216        this._options.error.call({name: context.name, nameArgs: context.nameArgs}, err);
    214217      }
    215       done(err, success);
     218      // only call done async if explicitly requested to
     219      // see: https://github.com/gruntjs/grunt/pull/1026
     220      if (asyncDone) {
     221        process.nextTick(function () {
     222          done(err, success);
     223        });
     224      } else {
     225        done(err, success);
     226      }
    216227    }.bind(this);
    217228
     
    244255
    245256  // Begin task queue processing. Ie. run all tasks.
    246   Task.prototype.start = function() {
     257  Task.prototype.start = function(opts) {
     258    if (!opts) {
     259      opts = {};
     260    }
    247261    // Abort if already running.
    248262    if (this._running) { return false; }
     
    281295      this.runTaskFn(context, function() {
    282296        return thing.task.fn.apply(this, this.args);
    283       }, nextTask);
     297      }, nextTask, !!opts.asyncDone);
    284298
    285299    }.bind(this);
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/colors/package.json

    r484 r516  
    2626  "readmeFilename": "ReadMe.md",
    2727  "_id": "colors@0.6.2",
    28   "dist": {
    29     "shasum": "57915cf80820c121e254ec8b7819ab808d2beae5"
    30   },
    31   "_from": "colors@~0.6.2",
    32   "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
    33   "scripts": {}
     28  "_from": "colors@~0.6.2"
    3429}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/eventemitter2/package.json

    r484 r516  
    5959  "homepage": "https://github.com/hij1nx/EventEmitter2",
    6060  "_id": "eventemitter2@0.4.13",
    61   "dist": {
    62     "shasum": "2a03bdff50bda6586cf2e27c71feeaf6d37c383c"
    63   },
    64   "_from": "eventemitter2@~0.4.13",
    65   "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.13.tgz"
     61  "_from": "eventemitter2@~0.4.13"
    6662}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/exit/package.json

    r484 r516  
    4848  "readmeFilename": "README.md",
    4949  "_id": "exit@0.1.2",
    50   "dist": {
    51     "shasum": "2a1f6b7dd67aedcf9544e948cc817113b64012a5"
    52   },
    53   "_from": "exit@~0.1.1",
    54   "_resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz"
     50  "_from": "exit@~0.1.1"
    5551}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/getobject/package.json

    r484 r516  
    4545  "readmeFilename": "README.md",
    4646  "_id": "getobject@0.1.0",
    47   "dist": {
    48     "shasum": "4563bd9ebffaa0790ee7eec6e2d74523b7e852a6"
    49   },
    50   "_from": "getobject@~0.1.0",
    51   "_resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz"
     47  "_from": "getobject@~0.1.0"
    5248}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json

    r484 r516  
    2727  "homepage": "https://github.com/isaacs/inherits",
    2828  "_id": "inherits@1.0.0",
    29   "dist": {
    30     "shasum": "26467026b3b86de1c6f72f00d9a31b1c97077a92"
    31   },
    3229  "_from": "inherits@1",
    33   "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz"
     30  "scripts": {}
    3431}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/iconv-lite/package.json

    r484 r516  
    7777  },
    7878  "_id": "iconv-lite@0.2.11",
    79   "dist": {
    80     "shasum": "1827821f46962889765690b557c045f5cc3976eb"
    81   },
    82   "_from": "iconv-lite@~0.2.11",
    83   "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz"
     79  "_from": "iconv-lite@~0.2.11"
    8480}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json

    r484 r516  
    7070  "readmeFilename": "README.markdown",
    7171  "_id": "underscore.string@2.3.3",
    72   "dist": {
    73     "shasum": "a7cea3b9aa84d24cf1363ccbddd02ee10abee0c0"
    74   },
    75   "_from": "underscore.string@~2.3.1",
    76   "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz"
     72  "_from": "underscore.string@~2.3.1"
    7773}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/README.md

    r484 r516  
    2020minimatch("bar.foo", "*.foo") // true!
    2121minimatch("bar.foo", "*.bar") // false!
     22minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
    2223```
    2324
     
    3637* `man 3 fnmatch`
    3738* `man 5 gitignore`
    38 
    39 ### Comparisons to other fnmatch/glob implementations
    40 
    41 While strict compliance with the existing standards is a worthwhile
    42 goal, some discrepancies exist between minimatch and other
    43 implementations, and are intentional.
    44 
    45 If the pattern starts with a `!` character, then it is negated.  Set the
    46 `nonegate` flag to suppress this behavior, and treat leading `!`
    47 characters normally.  This is perhaps relevant if you wish to start the
    48 pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
    49 characters at the start of a pattern will negate the pattern multiple
    50 times.
    51 
    52 If a pattern starts with `#`, then it is treated as a comment, and
    53 will not match anything.  Use `\#` to match a literal `#` at the
    54 start of a line, or set the `nocomment` flag to suppress this behavior.
    55 
    56 The double-star character `**` is supported by default, unless the
    57 `noglobstar` flag is set.  This is supported in the manner of bsdglob
    58 and bash 4.1, where `**` only has special significance if it is the only
    59 thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
    60 `a/**b` will not.  **Note that this is different from the way that `**` is
    61 handled by ruby's `Dir` class.**
    62 
    63 If an escaped pattern has no matches, and the `nonull` flag is set,
    64 then minimatch.match returns the pattern as-provided, rather than
    65 interpreting the character escapes.  For example,
    66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
    67 `"*a?"`.  This is akin to setting the `nullglob` option in bash, except
    68 that it does not resolve escaped pattern characters.
    69 
    70 If brace expansion is not disabled, then it is performed before any
    71 other interpretation of the glob pattern.  Thus, a pattern like
    72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
    73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
    74 checked for validity.  Since those two are valid, matching proceeds.
    75 
    7639
    7740## Minimatch Class
     
    217180Returns from negate expressions the same as if they were not negated.
    218181(Ie, true on a hit, false on a miss.)
     182
     183
     184## Comparisons to other fnmatch/glob implementations
     185
     186While strict compliance with the existing standards is a worthwhile
     187goal, some discrepancies exist between minimatch and other
     188implementations, and are intentional.
     189
     190If the pattern starts with a `!` character, then it is negated.  Set the
     191`nonegate` flag to suppress this behavior, and treat leading `!`
     192characters normally.  This is perhaps relevant if you wish to start the
     193pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
     194characters at the start of a pattern will negate the pattern multiple
     195times.
     196
     197If a pattern starts with `#`, then it is treated as a comment, and
     198will not match anything.  Use `\#` to match a literal `#` at the
     199start of a line, or set the `nocomment` flag to suppress this behavior.
     200
     201The double-star character `**` is supported by default, unless the
     202`noglobstar` flag is set.  This is supported in the manner of bsdglob
     203and bash 4.1, where `**` only has special significance if it is the only
     204thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
     205`a/**b` will not.
     206
     207If an escaped pattern has no matches, and the `nonull` flag is set,
     208then minimatch.match returns the pattern as-provided, rather than
     209interpreting the character escapes.  For example,
     210`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
     211`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
     212that it does not resolve escaped pattern characters.
     213
     214If brace expansion is not disabled, then it is performed before any
     215other interpretation of the glob pattern.  Thus, a pattern like
     216`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
     217**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
     218checked for validity.  Since those two are valid, matching proceeds.
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/minimatch.js

    r484 r516  
    6969var slashSplit = /\/+/
    7070
    71 minimatch.monkeyPatch = monkeyPatch
    72 function monkeyPatch () {
    73   var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
    74   var orig = desc.value
    75   desc.value = function (p) {
    76     if (p instanceof Minimatch) return p.match(this)
    77     return orig.call(this, p)
    78   }
    79   Object.defineProperty(String.prototype, desc)
    80 }
    81 
    8271minimatch.filter = filter
    8372function filter (pattern, options) {
     
    179168}
    180169
     170Minimatch.prototype.debug = function() {}
     171
    181172Minimatch.prototype.make = make
    182173function make () {
     
    203194  var set = this.globSet = this.braceExpand()
    204195
    205   if (options.debug) console.error(this.pattern, set)
     196  if (options.debug) this.debug = console.error
     197
     198  this.debug(this.pattern, set)
    206199
    207200  // step 3: now we have a set, so turn each one into a series of path-portion
     
    214207  })
    215208
    216   if (options.debug) console.error(this.pattern, set)
     209  this.debug(this.pattern, set)
    217210
    218211  // glob --> regexps
     
    221214  }, this)
    222215
    223   if (options.debug) console.error(this.pattern, set)
     216  this.debug(this.pattern, set)
    224217
    225218  // filter out everything that didn't compile properly.
     
    228221  })
    229222
    230   if (options.debug) console.error(this.pattern, set)
     223  this.debug(this.pattern, set)
    231224
    232225  this.set = set
     
    303296  // and then prepend it to everything we find.
    304297  if (pattern.charAt(0) !== "{") {
    305     // console.error(pattern)
     298    this.debug(pattern)
    306299    var prefix = null
    307300    for (var i = 0, l = pattern.length; i < l; i ++) {
    308301      var c = pattern.charAt(i)
    309       // console.error(i, c)
     302      this.debug(i, c)
    310303      if (c === "\\") {
    311304        escaping = !escaping
     
    318311    // actually no sets, all { were escaped.
    319312    if (prefix === null) {
    320       // console.error("no sets")
     313      this.debug("no sets")
    321314      return [pattern]
    322315    }
    323316
    324     var tail = braceExpand(pattern.substr(i), options)
     317   var tail = braceExpand.call(this, pattern.substr(i), options)
    325318    return tail.map(function (t) {
    326319      return prefix + t
     
    337330  var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
    338331  if (numset) {
    339     // console.error("numset", numset[1], numset[2])
    340     var suf = braceExpand(pattern.substr(numset[0].length), options)
     332    this.debug("numset", numset[1], numset[2])
     333    var suf = braceExpand.call(this, pattern.substr(numset[0].length), options)
    341334      , start = +numset[1]
    342335      , end = +numset[2]
     
    370363  }
    371364
    372   // console.error("Entering for")
     365  this.debug("Entering for")
    373366  FOR: for (i = 1, l = pattern.length; i < l; i ++) {
    374367    var c = pattern.charAt(i)
    375     // console.error("", i, c)
     368    this.debug("", i, c)
    376369
    377370    if (escaping) {
     
    421414  // and need to escape the leading brace
    422415  if (depth !== 0) {
    423     // console.error("didn't close", pattern)
    424     return braceExpand("\\" + pattern, options)
     416    this.debug("didn't close", pattern)
     417    return braceExpand.call(this, "\\" + pattern, options)
    425418  }
    426419
    427420  // x{y,z} -> ["xy", "xz"]
    428   // console.error("set", set)
    429   // console.error("suffix", pattern.substr(i))
    430   var suf = braceExpand(pattern.substr(i), options)
     421  this.debug("set", set)
     422  this.debug("suffix", pattern.substr(i))
     423  var suf = braceExpand.call(this, pattern.substr(i), options)
    431424  // ["b", "c{d,e}","{f,g}h"] ->
    432425  //   [["b"], ["cd", "ce"], ["fh", "gh"]]
    433426  var addBraces = set.length === 1
    434   // console.error("set pre-expanded", set)
     427  this.debug("set pre-expanded", set)
    435428  set = set.map(function (p) {
    436     return braceExpand(p, options)
    437   })
    438   // console.error("set expanded", set)
     429    return braceExpand.call(this, p, options)
     430  }, this)
     431  this.debug("set expanded", set)
    439432
    440433
     
    497490      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
    498491      : "(?!\\.)"
     492    , self = this
    499493
    500494  function clearStateChar () {
     
    515509          break
    516510      }
     511      self.debug('clearStateChar %j %j', stateChar, re)
    517512      stateChar = false
    518513    }
     
    523518      ; i ++ ) {
    524519
    525     if (options.debug) {
    526       console.error("%s\t%s %s %j", pattern, i, re, c)
    527     }
     520    this.debug("%s\t%s %s %j", pattern, i, re, c)
    528521
    529522    // skip over any that are escaped.
     
    552545      case "@":
    553546      case "!":
    554         if (options.debug) {
    555           console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
    556         }
     547        this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
    557548
    558549        // all of those are literals inside a class, except that
    559550        // the glob [!a] means [^a] in regexp
    560551        if (inClass) {
     552          this.debug('  in class')
    561553          if (c === "!" && i === classStart + 1) c = "^"
    562554          re += c
     
    567559        // that there was something like ** or +? in there.
    568560        // Handle the stateChar, then proceed with this one.
     561        self.debug('call clearStateChar %j', stateChar)
    569562        clearStateChar()
    570563        stateChar = c
     
    592585        // negation is (?:(?!js)[^/]*)
    593586        re += stateChar === "!" ? "(?:(?!" : "(?:"
     587        this.debug('plType %j %j', stateChar, re)
    594588        stateChar = false
    595589        continue
     
    601595        }
    602596
     597        clearStateChar()
    603598        hasMagic = true
    604599        re += ")"
     
    624619        }
    625620
     621        clearStateChar()
    626622        re += "|"
    627623        continue
     
    716712    })
    717713
    718     // console.error("tail=%j\n   %s", tail, tail)
     714    this.debug("tail=%j\n   %s", tail, tail)
    719715    var t = pl.type === "*" ? star
    720716          : pl.type === "?" ? qmark
     
    830826Minimatch.prototype.match = match
    831827function match (f, partial) {
    832   // console.error("match", f, this.pattern)
     828  this.debug("match", f, this.pattern)
    833829  // short-circuit in the case of busted things.
    834830  // comments, etc.
     
    848844  // treat the test path as a set of pathparts.
    849845  f = f.split(slashSplit)
    850   if (options.debug) {
    851     console.error(this.pattern, "split", f)
    852   }
     846  this.debug(this.pattern, "split", f)
    853847
    854848  // just ONE of the pattern sets in this.set needs to match
     
    858852
    859853  var set = this.set
    860   // console.error(this.pattern, "set", set)
     854  this.debug(this.pattern, "set", set)
     855
     856  var splitFile = path.basename(f.join("/")).split("/")
    861857
    862858  for (var i = 0, l = set.length; i < l; i ++) {
    863     var pattern = set[i]
    864     var hit = this.matchOne(f, pattern, partial)
     859    var pattern = set[i], file = f
     860    if (options.matchBase && pattern.length === 1) {
     861      file = splitFile
     862    }
     863    var hit = this.matchOne(file, pattern, partial)
    865864    if (hit) {
    866865      if (options.flipNegate) return true
     
    883882  var options = this.options
    884883
    885   if (options.debug) {
    886     console.error("matchOne",
    887                   { "this": this
    888                   , file: file
    889                   , pattern: pattern })
    890   }
    891 
    892   if (options.matchBase && pattern.length === 1) {
    893     file = path.basename(file.join("/")).split("/")
    894   }
    895 
    896   if (options.debug) {
    897     console.error("matchOne", file.length, pattern.length)
    898   }
     884  this.debug("matchOne",
     885              { "this": this
     886              , file: file
     887              , pattern: pattern })
     888
     889  this.debug("matchOne", file.length, pattern.length)
    899890
    900891  for ( var fi = 0
     
    905896      ; fi ++, pi ++ ) {
    906897
    907     if (options.debug) {
    908       console.error("matchOne loop")
    909     }
     898    this.debug("matchOne loop")
    910899    var p = pattern[pi]
    911900      , f = file[fi]
    912901
    913     if (options.debug) {
    914       console.error(pattern, p, f)
    915     }
     902    this.debug(pattern, p, f)
    916903
    917904    // should be impossible.
     
    920907
    921908    if (p === GLOBSTAR) {
    922       if (options.debug)
    923         console.error('GLOBSTAR', [pattern, p, f])
     909      this.debug('GLOBSTAR', [pattern, p, f])
    924910
    925911      // "**"
     
    948934        , pr = pi + 1
    949935      if (pr === pl) {
    950         if (options.debug)
    951           console.error('** at the end')
     936        this.debug('** at the end')
    952937        // a ** at the end will just swallow the rest.
    953938        // We have found a match.
     
    967952        var swallowee = file[fr]
    968953
    969         if (options.debug) {
    970           console.error('\nglobstar while',
    971                         file, fr, pattern, pr, swallowee)
    972         }
     954        this.debug('\nglobstar while',
     955                    file, fr, pattern, pr, swallowee)
    973956
    974957        // XXX remove this slice.  Just pass the start index.
    975958        if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
    976           if (options.debug)
    977             console.error('globstar found match!', fr, fl, swallowee)
     959          this.debug('globstar found match!', fr, fl, swallowee)
    978960          // found a match.
    979961          return true
     
    983965          if (swallowee === "." || swallowee === ".." ||
    984966              (!options.dot && swallowee.charAt(0) === ".")) {
    985             if (options.debug)
    986               console.error("dot detected!", file, fr, pattern, pr)
     967            this.debug("dot detected!", file, fr, pattern, pr)
    987968            break WHILE
    988969          }
    989970
    990971          // ** swallows a segment, and continue.
    991           if (options.debug)
    992             console.error('globstar swallow a segment, and continue')
     972          this.debug('globstar swallow a segment, and continue')
    993973          fr ++
    994974        }
     
    999979      if (partial) {
    1000980        // ran out of file
    1001         // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
     981        this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
    1002982        if (fr === fl) return true
    1003983      }
     
    1015995        hit = f === p
    1016996      }
    1017       if (options.debug) {
    1018         console.error("string match", p, f, hit)
    1019       }
     997      this.debug("string match", p, f, hit)
    1020998    } else {
    1021999      hit = f.match(p)
    1022       if (options.debug) {
    1023         console.error("pattern match", p, f, hit)
    1024       }
     1000      this.debug("pattern match", p, f, hit)
    10251001    }
    10261002
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json

    r484 r516  
    3030  "homepage": "https://github.com/isaacs/node-lru-cache",
    3131  "_id": "lru-cache@2.5.0",
    32   "dist": {
    33     "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69"
    34   },
    35   "_from": "lru-cache@2",
    36   "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
     32  "_from": "lru-cache@2"
    3733}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/package.json

    r484 r516  
    77  "name": "minimatch",
    88  "description": "a glob matcher in javascript",
    9   "version": "0.2.12",
     9  "version": "0.2.14",
    1010  "repository": {
    1111    "type": "git",
     
    1414  "main": "minimatch.js",
    1515  "scripts": {
    16     "test": "tap test"
     16    "test": "tap test/*.js"
    1717  },
    1818  "engines": {
     
    3030    "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
    3131  },
    32   "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.  **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n  Each row in the\n  array corresponds to a brace-expanded pattern.  Each item in the row\n  corresponds to a single path-part.  For example, the pattern\n  `{a,b/c}/d` would expand to a set of patterns like:\n\n        [ [ a, d ]\n        , [ b, c, d ] ]\n\n    If a portion of the pattern doesn't have any \"magic\" in it\n    (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n    will be left as a string rather than converted to a regular\n    expression.\n\n* `regexp` Created by the `makeRe` method.  A single regular expression\n  expressing the entire pattern.  This is useful in cases where you wish\n  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n  Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n  false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n  filename, and match it against a single row in the `regExpSet`.  This\n  method is mainly for internal use, but is exposed so that it can be\n  used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items.  So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export.  Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`.  Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob.  If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself.  When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes.  For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
     32  "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n  Each row in the\n  array corresponds to a brace-expanded pattern.  Each item in the row\n  corresponds to a single path-part.  For example, the pattern\n  `{a,b/c}/d` would expand to a set of patterns like:\n\n        [ [ a, d ]\n        , [ b, c, d ] ]\n\n    If a portion of the pattern doesn't have any \"magic\" in it\n    (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n    will be left as a string rather than converted to a regular\n    expression.\n\n* `regexp` Created by the `makeRe` method.  A single regular expression\n  expressing the entire pattern.  This is useful in cases where you wish\n  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n  Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n  false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n  filename, and match it against a single row in the `regExpSet`.  This\n  method is mainly for internal use, but is exposed so that it can be\n  used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items.  So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export.  Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`.  Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob.  If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself.  When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes.  For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n",
    3333  "readmeFilename": "README.md",
    3434  "bugs": {
     
    3636  },
    3737  "homepage": "https://github.com/isaacs/minimatch",
    38   "_id": "minimatch@0.2.12",
    39   "_from": "minimatch@0.x.x"
     38  "_id": "minimatch@0.2.14",
     39  "_from": "minimatch@~0.2.12"
    4040}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/rimraf/README.md

    r484 r516  
    1 A `rm -rf` for node.
     1`rm -rf` for node.
    22
    33Install with `npm install rimraf`, or just drop rimraf.js somewhere.
     
    1010errors are handled for you:
    1111
    12 * `EBUSY` -  rimraf will back off a maximum of opts.maxBusyTries times
    13   before giving up.
    14 * `EMFILE` - If too many file descriptors get opened, rimraf will
    15   patiently wait until more become available.
    16 
     12* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
     13  `opts.maxBusyTries` times before giving up.
     14* `ENOENT` - If the file doesn't exist, rimraf will return
     15  successfully, since your desired outcome is already the case.
    1716
    1817## rimraf.sync
     
    2019It can remove stuff synchronously, too.  But that's not so good.  Use
    2120the async API.  It's better.
     21
     22## CLI
     23
     24If installed with `npm install rimraf -g` it can be used as a global
     25command `rimraf <path>` which is useful for cross platform support.
     26
     27## mkdirp
     28
     29If you need to create a directory recursively, check out
     30[mkdirp](https://github.com/substack/node-mkdirp).
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/rimraf/package.json

    r484 r516  
    11{
    22  "name": "rimraf",
    3   "version": "2.0.3",
     3  "version": "2.2.6",
    44  "main": "rimraf.js",
    55  "description": "A deep deletion module for node (like `rm -rf`)",
     
    1313    "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE"
    1414  },
    15   "optionalDependencies": {
    16     "graceful-fs": "~1.1"
    17   },
    1815  "repository": {
    1916    "type": "git",
     
    2219  "scripts": {
    2320    "test": "cd test && bash run.sh"
     21  },
     22  "bin": {
     23    "rimraf": "./bin.js"
    2424  },
    2525  "contributors": [
     
    4646    }
    4747  ],
    48   "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one.  Certain\nerrors are handled for you:\n\n* `EBUSY` -  rimraf will back off a maximum of opts.maxBusyTries times\n  before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n  patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too.  But that's not so good.  Use\nthe async API.  It's better.\n",
     48  "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one.  Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n  `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n  successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too.  But that's not so good.  Use\nthe async API.  It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n",
    4949  "readmeFilename": "README.md",
    5050  "bugs": {
     
    5252  },
    5353  "homepage": "https://github.com/isaacs/rimraf",
    54   "dependencies": {
    55     "graceful-fs": "~1.1"
     54  "_id": "rimraf@2.2.6",
     55  "dist": {
     56    "shasum": "c28d4de4cafcd392b82d02729509c65e3502240c"
    5657  },
    57   "_id": "rimraf@2.0.3",
    58   "_from": "rimraf@~2.0.3"
     58  "_from": "rimraf@~2.2.6",
     59  "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz"
    5960}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/rimraf/rimraf.js

    r484 r516  
    33
    44var path = require("path")
    5   , fs
    6 
    7 try {
    8   // optional dependency
    9   fs = require("graceful-fs")
    10 } catch (er) {
    11   fs = require("fs")
    12 }
    13 
    14 var lstat = "lstat"
    15 if (process.platform === "win32") {
    16   // not reliable on windows prior to 0.7.9
    17   var v = process.version.replace(/^v/, '').split(/\.|-/).map(Number)
    18   if (v[0] === 0 && (v[1] < 7 || v[1] == 7 && v[2] < 9)) {
    19     lstat = "stat"
    20   }
    21 }
    22 if (!fs[lstat]) lstat = "stat"
    23 var lstatSync = lstat + "Sync"
     5var fs = require("fs")
    246
    257// for EMFILE handling
     
    2810exports.BUSYTRIES_MAX = 3
    2911
     12var isWindows = (process.platform === "win32")
     13
    3014function rimraf (p, cb) {
    31 
    3215  if (!cb) throw new Error("No callback passed to rimraf()")
    3316
    3417  var busyTries = 0
    35 
    3618  rimraf_(p, function CB (er) {
    3719    if (er) {
    38       if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) {
     20      if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") &&
     21          busyTries < exports.BUSYTRIES_MAX) {
    3922        busyTries ++
    4023        var time = busyTries * 100
     
    6144}
    6245
     46// Two possible strategies.
     47// 1. Assume it's a file.  unlink it, then do the dir stuff on EPERM or EISDIR
     48// 2. Assume it's a directory.  readdir, then do the file stuff on ENOTDIR
     49//
     50// Both result in an extra syscall when you guess wrong.  However, there
     51// are likely far more normal files in the world than directories.  This
     52// is based on the assumption that a the average number of files per
     53// directory is >= 1.
     54//
     55// If anyone ever complains about this, then I guess the strategy could
     56// be made configurable somehow.  But until then, YAGNI.
    6357function rimraf_ (p, cb) {
    64   fs[lstat](p, function (er, s) {
     58  fs.unlink(p, function (er) {
    6559    if (er) {
    66       // already gone
    67       if (er.code === "ENOENT") return cb()
    68       // some other kind of error, permissions, etc.
    69       return cb(er)
     60      if (er.code === "ENOENT")
     61        return cb(null)
     62      if (er.code === "EPERM")
     63        return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb)
     64      if (er.code === "EISDIR")
     65        return rmdir(p, er, cb)
    7066    }
    71 
    72     return rm_(p, s, false, cb)
     67    return cb(er)
    7368  })
    7469}
    7570
    76 
    77 var myGid = function myGid () {
    78   var g = process.getgid && process.getgid()
    79   myGid = function myGid () { return g }
    80   return g
     71function fixWinEPERM (p, er, cb) {
     72  fs.chmod(p, 666, function (er2) {
     73    if (er2)
     74      cb(er2.code === "ENOENT" ? null : er)
     75    else
     76      fs.stat(p, function(er3, stats) {
     77        if (er3)
     78          cb(er3.code === "ENOENT" ? null : er)
     79        else if (stats.isDirectory())
     80          rmdir(p, er, cb)
     81        else
     82          fs.unlink(p, cb)
     83      })
     84  })
    8185}
    8286
    83 var myUid = function myUid () {
    84   var u = process.getuid && process.getuid()
    85   myUid = function myUid () { return u }
    86   return u
     87function fixWinEPERMSync (p, er, cb) {
     88  try {
     89    fs.chmodSync(p, 666)
     90  } catch (er2) {
     91    if (er2.code !== "ENOENT")
     92      throw er
     93  }
     94
     95  try {
     96    var stats = fs.statSync(p)
     97  } catch (er3) {
     98    if (er3 !== "ENOENT")
     99      throw er
     100  }
     101
     102  if (stats.isDirectory())
     103    rmdirSync(p, er)
     104  else
     105    fs.unlinkSync(p)
    87106}
    88107
    89 
    90 function writable (s) {
    91   var mode = s.mode || 0777
    92     , uid = myUid()
    93     , gid = myGid()
    94   return (mode & 0002)
    95       || (gid === s.gid && (mode & 0020))
    96       || (uid === s.uid && (mode & 0200))
     108function rmdir (p, originalEr, cb) {
     109  // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
     110  // if we guessed wrong, and it's not a directory, then
     111  // raise the original error.
     112  fs.rmdir(p, function (er) {
     113    if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
     114      rmkids(p, cb)
     115    else if (er && er.code === "ENOTDIR")
     116      cb(originalEr)
     117    else
     118      cb(er)
     119  })
    97120}
    98121
    99 function rm_ (p, s, didWritableCheck, cb) {
    100   if (!didWritableCheck && !writable(s)) {
    101     // make file writable
    102     // user/group/world, doesn't matter at this point
    103     // since it's about to get nuked.
    104     return fs.chmod(p, s.mode | 0222, function (er) {
    105       if (er) return cb(er)
    106       rm_(p, s, true, cb)
    107     })
    108   }
    109 
    110   if (!s.isDirectory()) {
    111     return fs.unlink(p, cb)
    112   }
    113 
    114   // directory
     122function rmkids(p, cb) {
    115123  fs.readdir(p, function (er, files) {
    116     if (er) return cb(er)
    117     asyncForEach(files.map(function (f) {
    118       return path.join(p, f)
    119     }), function (file, cb) {
    120       rimraf(file, cb)
    121     }, function (er) {
    122       if (er) return cb(er)
    123       fs.rmdir(p, cb)
     124    if (er)
     125      return cb(er)
     126    var n = files.length
     127    if (n === 0)
     128      return fs.rmdir(p, cb)
     129    var errState
     130    files.forEach(function (f) {
     131      rimraf(path.join(p, f), function (er) {
     132        if (errState)
     133          return
     134        if (er)
     135          return cb(errState = er)
     136        if (--n === 0)
     137          fs.rmdir(p, cb)
     138      })
    124139    })
    125140  })
    126141}
    127142
    128 function asyncForEach (list, fn, cb) {
    129   if (!list.length) cb()
    130   var c = list.length
    131     , errState = null
    132   list.forEach(function (item, i, list) {
    133     fn(item, function (er) {
    134       if (errState) return
    135       if (er) return cb(errState = er)
    136       if (-- c === 0) return cb()
    137     })
    138   })
     143// this looks simpler, and is strictly *faster*, but will
     144// tie up the JavaScript thread and fail on excessively
     145// deep directory trees.
     146function rimrafSync (p) {
     147  try {
     148    fs.unlinkSync(p)
     149  } catch (er) {
     150    if (er.code === "ENOENT")
     151      return
     152    if (er.code === "EPERM")
     153      return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er)
     154    if (er.code !== "EISDIR")
     155      throw er
     156    rmdirSync(p, er)
     157  }
    139158}
    140159
    141 // this looks simpler, but it will fail with big directory trees,
    142 // or on slow stupid awful cygwin filesystems
    143 function rimrafSync (p) {
     160function rmdirSync (p, originalEr) {
    144161  try {
    145     var s = fs[lstatSync](p)
     162    fs.rmdirSync(p)
    146163  } catch (er) {
    147     if (er.code === "ENOENT") return
    148     throw er
     164    if (er.code === "ENOENT")
     165      return
     166    if (er.code === "ENOTDIR")
     167      throw originalEr
     168    if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
     169      rmkidsSync(p)
    149170  }
     171}
    150172
    151   if (!writable(s)) {
    152     fs.chmodSync(p, s.mode | 0222)
    153   }
    154 
    155   if (!s.isDirectory()) return fs.unlinkSync(p)
    156 
     173function rmkidsSync (p) {
    157174  fs.readdirSync(p).forEach(function (f) {
    158175    rimrafSync(path.join(p, f))
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/underscore.string/package.json

    r484 r516  
    6969  "readmeFilename": "README.markdown",
    7070  "_id": "underscore.string@2.2.1",
    71   "dist": {
    72     "shasum": "2aa155e7c49bcbfd88ec69b8c9694d885385c717"
    73   },
    74   "_from": "underscore.string@~2.2.1",
    75   "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz"
     71  "_from": "underscore.string@~2.2.1"
    7672}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/package.json

    r484 r516  
    22  "name": "grunt",
    33  "description": "The JavaScript Task Runner",
    4   "version": "0.4.2",
     4  "version": "0.4.4",
    55  "author": {
    66    "name": "\"Cowboy\" Ben Alman",
     
    5959    "minimatch": "~0.2.12",
    6060    "nopt": "~1.0.10",
    61     "rimraf": "~2.0.3",
     61    "rimraf": "~2.2.6",
    6262    "lodash": "~0.9.2",
    6363    "underscore.string": "~2.2.1",
     
    6565    "js-yaml": "~2.0.5",
    6666    "exit": "~0.1.1",
    67     "getobject": "~0.1.0"
     67    "getobject": "~0.1.0",
     68    "grunt-legacy-util": "~0.1.2"
    6869  },
    6970  "devDependencies": {
     
    7677    "shelljs": "~0.2.5"
    7778  },
    78   "readme": "# Grunt: The JavaScript Task Runner [![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",
     79  "readme": "# Grunt: The JavaScript Task Runner\n\n[![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)\n[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",
    7980  "readmeFilename": "README.md",
    80   "_id": "grunt@0.4.2",
     81  "_id": "grunt@0.4.4",
    8182  "dist": {
    82     "shasum": "1f6804f00e977dd90b9f97b1faed480215db0857"
     83    "shasum": "64f477fef801475ab92f1819a691c6c71b72902e"
    8384  },
    84   "_from": "grunt@0.4.2",
    85   "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.2.tgz"
     85  "_from": "grunt@0.4.4",
     86  "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.4.tgz"
    8687}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/mout/package.json

    r484 r516  
    7474  "readmeFilename": "README.md",
    7575  "_id": "mout@0.3.0",
    76   "_from": "mout@0.3.0",
    7776  "dist": {
    7877    "shasum": "f4be536a04a0e0faebdc81bb68a23ceaba4d6c90"
    7978  },
     79  "_from": "mout@0.3.0",
    8080  "_resolved": "https://registry.npmjs.org/mout/-/mout-0.3.0.tgz"
    8181}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/underscore/package.json

    r484 r516  
    3232  },
    3333  "_id": "underscore@1.4.4",
    34   "_from": "underscore@1.4.4",
    35   "dist": {
    36     "shasum": "3e7ceb21f205bc19964685e1fdd52c8f77773674"
    37   },
    38   "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"
     34  "_from": "underscore@1.4.4"
    3935}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/package.json

    r484 r516  
    3434  },
    3535  "_from": "grunt-lib-amd@0.1.x",
    36   "_resolved": "https://registry.npmjs.org/grunt-lib-amd/-/grunt-lib-amd-0.1.3.tgz"
     36  "_resolved": "https://registry.npmjs.org/grunt-lib-amd/-/grunt-lib-amd-0.1.3.tgz",
     37  "devDependencies": {
     38    "amdefine": "0.0.8",
     39    "underscore": "^1.4.4",
     40    "grunt": "^0.4.4",
     41    "mout": "^0.3.0"
     42  }
    3743}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/.npmignore

    r484 r516  
    44AUTHORS
    55CHANGELOG
    6 CONTRIBUTING.MD
     6CONTRIBUTING.md
    77custom-gruntfile.js
    88Gruntfile.js
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/LICENSE-MIT

    r484 r516  
    1 Copyright (c) 2013 "Cowboy" Ben Alman
     1Copyright (c) 2014 "Cowboy" Ben Alman
    22
    33Permission is hereby granted, free of charge, to any person
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/README.md

    r484 r516  
    1 # Grunt: The JavaScript Task Runner [![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)
     1# Grunt: The JavaScript Task Runner
     2
     3[![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)
     4[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
    25
    36<img align="right" height="260" src="http://gruntjs.com/img/grunt-logo-no-wordmark.svg">
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/internal-tasks/bump.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman, contributors
     5 * Copyright (c) 2014 "Cowboy" Ben Alman, contributors
    66 * Licensed under the MIT license.
    77 */
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/internal-tasks/subgrunt.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    2323  return grunt[name] = require('./grunt/' + name);
    2424}
    25 var util = gRequire('util');
     25
     26var util = require('grunt-legacy-util');
     27grunt.util = util;
     28grunt.util.task = require('./util/task');
     29
    2630gRequire('template');
    2731gRequire('event');
     
    153157  // allows the error callback to execute multiple times.
    154158  tasks.forEach(function(name) { task.run(name); });
    155   task.start();
     159  // Run tasks async internally to reduce call-stack, per:
     160  // https://github.com/gruntjs/grunt/pull/1026
     161  task.start({asyncDone:true});
    156162};
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/cli.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    2222  // CLI-parsed options override any passed-in "default" options.
    2323  if (options) {
    24     // For each defult option...
     24    // For each default option...
    2525    Object.keys(options).forEach(function(key) {
    2626      if (!(key in cli.options)) {
     
    6262    short: 'd',
    6363    info: 'Enable debugging mode for tasks that support it.',
    64     type: Number
     64    type: [Number, Boolean]
    6565  },
    6666  stack: {
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/config.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/event.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/fail.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/file.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    134134var pathSeparatorRe = /[\/\\]/g;
    135135
     136// The "ext" option refers to either everything after the first dot (default)
     137// or everything after the last dot.
     138var extDotRe = {
     139  first: /(\.[^\/]*)?$/,
     140  last: /(\.[^\/\.]*)?$/,
     141};
     142
    136143// Build a multi task "files" object dynamically.
    137144file.expandMapping = function(patterns, destBase, options) {
    138145  options = grunt.util._.defaults({}, options, {
     146    extDot: 'first',
    139147    rename: function(destBase, destPath) {
    140148      return path.join(destBase || '', destPath);
     
    151159    }
    152160    // Change the extension?
    153     if (options.ext) {
    154       destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext);
     161    if ('ext' in options) {
     162      destPath = destPath.replace(extDotRe[options.extDot], options.ext);
    155163    }
    156164    // Generate destination filename.
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/help.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/log.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/option.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/task.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    108108      }
    109109    } else if (Array.isArray(data.files)) {
    110       data.files.forEach(function(obj) {
     110      grunt.util._.flatten(data.files).forEach(function(obj) {
    111111        var prop;
    112112        if ('src' in obj || 'dest' in obj) {
     
    245245      return options;
    246246    };
     247    // Expose the current target.
     248    this.target = target;
     249    // Recreate flags object so that the target isn't set as a flag.
     250    this.flags = {};
     251    this.args.forEach(function(arg) { this.flags[arg] = true; }, this);
    247252    // Expose data on `this` (as well as task.current).
    248253    this.data = grunt.config([name, target]);
     
    256261      }.bind(this)
    257262    });
    258     // Expose the current target.
    259     this.target = target;
    260     // Recreate flags object so that the target isn't set as a flag.
    261     this.flags = {};
    262     this.args.forEach(function(arg) { this.flags[arg] = true; }, this);
    263263    // Call original task function, passing in the target and any other args.
    264264    return fn.apply(this, this.args);
     
    278278// Override built-in renameTask to use the registry.
    279279task.renameTask = function(oldname, newname) {
    280   // Add and remove task.
    281   registry.untasks.push(oldname);
    282   registry.tasks.push(newname);
    283   // Actually rename task.
    284   return parent.renameTask.apply(task, arguments);
     280  var result;
     281  try {
     282    // Actually rename task.
     283    result = parent.renameTask.apply(task, arguments);
     284    // Add and remove task.
     285    registry.untasks.push(oldname);
     286    registry.tasks.push(newname);
     287    // Return result.
     288    return result;
     289  } catch(e) {
     290    grunt.log.error(e.message);
     291  }
    285292};
    286293
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/template.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/util/task.js

    r484 r516  
    33 * http://gruntjs.com/
    44 *
    5  * Copyright (c) 2013 "Cowboy" Ben Alman
     5 * Copyright (c) 2014 "Cowboy" Ben Alman
    66 * Licensed under the MIT license.
    77 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
     
    9090  // easier to implement than some kind of in-task "super" functionality.
    9191  Task.prototype.renameTask = function(oldname, newname) {
     92    if (!this._tasks[oldname]) {
     93      throw new Error('Cannot rename missing "' + oldname + '" task.');
     94    }
    9295    // Rename task.
    9396    this._tasks[newname] = this._tasks[oldname];
     
    186189
    187190  // Run a task function, handling this.async / return value.
    188   Task.prototype.runTaskFn = function(context, fn, done) {
     191  Task.prototype.runTaskFn = function(context, fn, done, asyncDone) {
    189192    // Async flag.
    190193    var async = false;
     
    213216        this._options.error.call({name: context.name, nameArgs: context.nameArgs}, err);
    214217      }
    215       done(err, success);
     218      // only call done async if explicitly requested to
     219      // see: https://github.com/gruntjs/grunt/pull/1026
     220      if (asyncDone) {
     221        process.nextTick(function () {
     222          done(err, success);
     223        });
     224      } else {
     225        done(err, success);
     226      }
    216227    }.bind(this);
    217228
     
    244255
    245256  // Begin task queue processing. Ie. run all tasks.
    246   Task.prototype.start = function() {
     257  Task.prototype.start = function(opts) {
     258    if (!opts) {
     259      opts = {};
     260    }
    247261    // Abort if already running.
    248262    if (this._running) { return false; }
     
    281295      this.runTaskFn(context, function() {
    282296        return thing.task.fn.apply(this, this.args);
    283       }, nextTask);
     297      }, nextTask, !!opts.asyncDone);
    284298
    285299    }.bind(this);
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/colors/package.json

    r484 r516  
    2626  "readmeFilename": "ReadMe.md",
    2727  "_id": "colors@0.6.2",
    28   "dist": {
    29     "shasum": "57915cf80820c121e254ec8b7819ab808d2beae5"
    30   },
    31   "_from": "colors@~0.6.2",
    32   "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
    33   "scripts": {}
     28  "_from": "colors@~0.6.2"
    3429}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/eventemitter2/package.json

    r484 r516  
    5959  "homepage": "https://github.com/hij1nx/EventEmitter2",
    6060  "_id": "eventemitter2@0.4.13",
    61   "dist": {
    62     "shasum": "2a03bdff50bda6586cf2e27c71feeaf6d37c383c"
    63   },
    64   "_from": "eventemitter2@~0.4.13",
    65   "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.13.tgz"
     61  "_from": "eventemitter2@~0.4.13"
    6662}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/exit/package.json

    r484 r516  
    4848  "readmeFilename": "README.md",
    4949  "_id": "exit@0.1.2",
    50   "dist": {
    51     "shasum": "2a1f6b7dd67aedcf9544e948cc817113b64012a5"
    52   },
    53   "_from": "exit@~0.1.1",
    54   "_resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz"
     50  "_from": "exit@~0.1.1"
    5551}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/getobject/package.json

    r484 r516  
    4545  "readmeFilename": "README.md",
    4646  "_id": "getobject@0.1.0",
    47   "dist": {
    48     "shasum": "4563bd9ebffaa0790ee7eec6e2d74523b7e852a6"
    49   },
    50   "_from": "getobject@~0.1.0",
    51   "_resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz"
     47  "_from": "getobject@~0.1.0"
    5248}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json

    r484 r516  
    2727  "homepage": "https://github.com/isaacs/inherits",
    2828  "_id": "inherits@1.0.0",
    29   "dist": {
    30     "shasum": "26467026b3b86de1c6f72f00d9a31b1c97077a92"
    31   },
    32   "_from": "inherits@1",
    33   "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz"
     29  "_from": "inherits@1"
    3430}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/iconv-lite/package.json

    r484 r516  
    7777  },
    7878  "_id": "iconv-lite@0.2.11",
    79   "dist": {
    80     "shasum": "1827821f46962889765690b557c045f5cc3976eb"
    81   },
    82   "_from": "iconv-lite@~0.2.11",
    83   "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz"
     79  "_from": "iconv-lite@~0.2.11"
    8480}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json

    r484 r516  
    7070  "readmeFilename": "README.markdown",
    7171  "_id": "underscore.string@2.3.3",
    72   "dist": {
    73     "shasum": "a7cea3b9aa84d24cf1363ccbddd02ee10abee0c0"
    74   },
    75   "_from": "underscore.string@~2.3.1",
    76   "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz"
     72  "_from": "underscore.string@~2.3.1"
    7773}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/README.md

    r484 r516  
    2020minimatch("bar.foo", "*.foo") // true!
    2121minimatch("bar.foo", "*.bar") // false!
     22minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!
    2223```
    2324
     
    3637* `man 3 fnmatch`
    3738* `man 5 gitignore`
    38 
    39 ### Comparisons to other fnmatch/glob implementations
    40 
    41 While strict compliance with the existing standards is a worthwhile
    42 goal, some discrepancies exist between minimatch and other
    43 implementations, and are intentional.
    44 
    45 If the pattern starts with a `!` character, then it is negated.  Set the
    46 `nonegate` flag to suppress this behavior, and treat leading `!`
    47 characters normally.  This is perhaps relevant if you wish to start the
    48 pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
    49 characters at the start of a pattern will negate the pattern multiple
    50 times.
    51 
    52 If a pattern starts with `#`, then it is treated as a comment, and
    53 will not match anything.  Use `\#` to match a literal `#` at the
    54 start of a line, or set the `nocomment` flag to suppress this behavior.
    55 
    56 The double-star character `**` is supported by default, unless the
    57 `noglobstar` flag is set.  This is supported in the manner of bsdglob
    58 and bash 4.1, where `**` only has special significance if it is the only
    59 thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
    60 `a/**b` will not.  **Note that this is different from the way that `**` is
    61 handled by ruby's `Dir` class.**
    62 
    63 If an escaped pattern has no matches, and the `nonull` flag is set,
    64 then minimatch.match returns the pattern as-provided, rather than
    65 interpreting the character escapes.  For example,
    66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
    67 `"*a?"`.  This is akin to setting the `nullglob` option in bash, except
    68 that it does not resolve escaped pattern characters.
    69 
    70 If brace expansion is not disabled, then it is performed before any
    71 other interpretation of the glob pattern.  Thus, a pattern like
    72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
    73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
    74 checked for validity.  Since those two are valid, matching proceeds.
    75 
    7639
    7740## Minimatch Class
     
    217180Returns from negate expressions the same as if they were not negated.
    218181(Ie, true on a hit, false on a miss.)
     182
     183
     184## Comparisons to other fnmatch/glob implementations
     185
     186While strict compliance with the existing standards is a worthwhile
     187goal, some discrepancies exist between minimatch and other
     188implementations, and are intentional.
     189
     190If the pattern starts with a `!` character, then it is negated.  Set the
     191`nonegate` flag to suppress this behavior, and treat leading `!`
     192characters normally.  This is perhaps relevant if you wish to start the
     193pattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`
     194characters at the start of a pattern will negate the pattern multiple
     195times.
     196
     197If a pattern starts with `#`, then it is treated as a comment, and
     198will not match anything.  Use `\#` to match a literal `#` at the
     199start of a line, or set the `nocomment` flag to suppress this behavior.
     200
     201The double-star character `**` is supported by default, unless the
     202`noglobstar` flag is set.  This is supported in the manner of bsdglob
     203and bash 4.1, where `**` only has special significance if it is the only
     204thing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but
     205`a/**b` will not.
     206
     207If an escaped pattern has no matches, and the `nonull` flag is set,
     208then minimatch.match returns the pattern as-provided, rather than
     209interpreting the character escapes.  For example,
     210`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
     211`"*a?"`.  This is akin to setting the `nullglob` option in bash, except
     212that it does not resolve escaped pattern characters.
     213
     214If brace expansion is not disabled, then it is performed before any
     215other interpretation of the glob pattern.  Thus, a pattern like
     216`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
     217**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
     218checked for validity.  Since those two are valid, matching proceeds.
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/minimatch.js

    r484 r516  
    6969var slashSplit = /\/+/
    7070
    71 minimatch.monkeyPatch = monkeyPatch
    72 function monkeyPatch () {
    73   var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
    74   var orig = desc.value
    75   desc.value = function (p) {
    76     if (p instanceof Minimatch) return p.match(this)
    77     return orig.call(this, p)
    78   }
    79   Object.defineProperty(String.prototype, desc)
    80 }
    81 
    8271minimatch.filter = filter
    8372function filter (pattern, options) {
     
    179168}
    180169
     170Minimatch.prototype.debug = function() {}
     171
    181172Minimatch.prototype.make = make
    182173function make () {
     
    203194  var set = this.globSet = this.braceExpand()
    204195
    205   if (options.debug) console.error(this.pattern, set)
     196  if (options.debug) this.debug = console.error
     197
     198  this.debug(this.pattern, set)
    206199
    207200  // step 3: now we have a set, so turn each one into a series of path-portion
     
    214207  })
    215208
    216   if (options.debug) console.error(this.pattern, set)
     209  this.debug(this.pattern, set)
    217210
    218211  // glob --> regexps
     
    221214  }, this)
    222215
    223   if (options.debug) console.error(this.pattern, set)
     216  this.debug(this.pattern, set)
    224217
    225218  // filter out everything that didn't compile properly.
     
    228221  })
    229222
    230   if (options.debug) console.error(this.pattern, set)
     223  this.debug(this.pattern, set)
    231224
    232225  this.set = set
     
    303296  // and then prepend it to everything we find.
    304297  if (pattern.charAt(0) !== "{") {
    305     // console.error(pattern)
     298    this.debug(pattern)
    306299    var prefix = null
    307300    for (var i = 0, l = pattern.length; i < l; i ++) {
    308301      var c = pattern.charAt(i)
    309       // console.error(i, c)
     302      this.debug(i, c)
    310303      if (c === "\\") {
    311304        escaping = !escaping
     
    318311    // actually no sets, all { were escaped.
    319312    if (prefix === null) {
    320       // console.error("no sets")
     313      this.debug("no sets")
    321314      return [pattern]
    322315    }
    323316
    324     var tail = braceExpand(pattern.substr(i), options)
     317   var tail = braceExpand.call(this, pattern.substr(i), options)
    325318    return tail.map(function (t) {
    326319      return prefix + t
     
    337330  var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
    338331  if (numset) {
    339     // console.error("numset", numset[1], numset[2])
    340     var suf = braceExpand(pattern.substr(numset[0].length), options)
     332    this.debug("numset", numset[1], numset[2])
     333    var suf = braceExpand.call(this, pattern.substr(numset[0].length), options)
    341334      , start = +numset[1]
    342335      , end = +numset[2]
     
    370363  }
    371364
    372   // console.error("Entering for")
     365  this.debug("Entering for")
    373366  FOR: for (i = 1, l = pattern.length; i < l; i ++) {
    374367    var c = pattern.charAt(i)
    375     // console.error("", i, c)
     368    this.debug("", i, c)
    376369
    377370    if (escaping) {
     
    421414  // and need to escape the leading brace
    422415  if (depth !== 0) {
    423     // console.error("didn't close", pattern)
    424     return braceExpand("\\" + pattern, options)
     416    this.debug("didn't close", pattern)
     417    return braceExpand.call(this, "\\" + pattern, options)
    425418  }
    426419
    427420  // x{y,z} -> ["xy", "xz"]
    428   // console.error("set", set)
    429   // console.error("suffix", pattern.substr(i))
    430   var suf = braceExpand(pattern.substr(i), options)
     421  this.debug("set", set)
     422  this.debug("suffix", pattern.substr(i))
     423  var suf = braceExpand.call(this, pattern.substr(i), options)
    431424  // ["b", "c{d,e}","{f,g}h"] ->
    432425  //   [["b"], ["cd", "ce"], ["fh", "gh"]]
    433426  var addBraces = set.length === 1
    434   // console.error("set pre-expanded", set)
     427  this.debug("set pre-expanded", set)
    435428  set = set.map(function (p) {
    436     return braceExpand(p, options)
    437   })
    438   // console.error("set expanded", set)
     429    return braceExpand.call(this, p, options)
     430  }, this)
     431  this.debug("set expanded", set)
    439432
    440433
     
    497490      : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
    498491      : "(?!\\.)"
     492    , self = this
    499493
    500494  function clearStateChar () {
     
    515509          break
    516510      }
     511      self.debug('clearStateChar %j %j', stateChar, re)
    517512      stateChar = false
    518513    }
     
    523518      ; i ++ ) {
    524519
    525     if (options.debug) {
    526       console.error("%s\t%s %s %j", pattern, i, re, c)
    527     }
     520    this.debug("%s\t%s %s %j", pattern, i, re, c)
    528521
    529522    // skip over any that are escaped.
     
    552545      case "@":
    553546      case "!":
    554         if (options.debug) {
    555           console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
    556         }
     547        this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
    557548
    558549        // all of those are literals inside a class, except that
    559550        // the glob [!a] means [^a] in regexp
    560551        if (inClass) {
     552          this.debug('  in class')
    561553          if (c === "!" && i === classStart + 1) c = "^"
    562554          re += c
     
    567559        // that there was something like ** or +? in there.
    568560        // Handle the stateChar, then proceed with this one.
     561        self.debug('call clearStateChar %j', stateChar)
    569562        clearStateChar()
    570563        stateChar = c
     
    592585        // negation is (?:(?!js)[^/]*)
    593586        re += stateChar === "!" ? "(?:(?!" : "(?:"
     587        this.debug('plType %j %j', stateChar, re)
    594588        stateChar = false
    595589        continue
     
    601595        }
    602596
     597        clearStateChar()
    603598        hasMagic = true
    604599        re += ")"
     
    624619        }
    625620
     621        clearStateChar()
    626622        re += "|"
    627623        continue
     
    716712    })
    717713
    718     // console.error("tail=%j\n   %s", tail, tail)
     714    this.debug("tail=%j\n   %s", tail, tail)
    719715    var t = pl.type === "*" ? star
    720716          : pl.type === "?" ? qmark
     
    830826Minimatch.prototype.match = match
    831827function match (f, partial) {
    832   // console.error("match", f, this.pattern)
     828  this.debug("match", f, this.pattern)
    833829  // short-circuit in the case of busted things.
    834830  // comments, etc.
     
    848844  // treat the test path as a set of pathparts.
    849845  f = f.split(slashSplit)
    850   if (options.debug) {
    851     console.error(this.pattern, "split", f)
    852   }
     846  this.debug(this.pattern, "split", f)
    853847
    854848  // just ONE of the pattern sets in this.set needs to match
     
    858852
    859853  var set = this.set
    860   // console.error(this.pattern, "set", set)
     854  this.debug(this.pattern, "set", set)
     855
     856  var splitFile = path.basename(f.join("/")).split("/")
    861857
    862858  for (var i = 0, l = set.length; i < l; i ++) {
    863     var pattern = set[i]
    864     var hit = this.matchOne(f, pattern, partial)
     859    var pattern = set[i], file = f
     860    if (options.matchBase && pattern.length === 1) {
     861      file = splitFile
     862    }
     863    var hit = this.matchOne(file, pattern, partial)
    865864    if (hit) {
    866865      if (options.flipNegate) return true
     
    883882  var options = this.options
    884883
    885   if (options.debug) {
    886     console.error("matchOne",
    887                   { "this": this
    888                   , file: file
    889                   , pattern: pattern })
    890   }
    891 
    892   if (options.matchBase && pattern.length === 1) {
    893     file = path.basename(file.join("/")).split("/")
    894   }
    895 
    896   if (options.debug) {
    897     console.error("matchOne", file.length, pattern.length)
    898   }
     884  this.debug("matchOne",
     885              { "this": this
     886              , file: file
     887              , pattern: pattern })
     888
     889  this.debug("matchOne", file.length, pattern.length)
    899890
    900891  for ( var fi = 0
     
    905896      ; fi ++, pi ++ ) {
    906897
    907     if (options.debug) {
    908       console.error("matchOne loop")
    909     }
     898    this.debug("matchOne loop")
    910899    var p = pattern[pi]
    911900      , f = file[fi]
    912901
    913     if (options.debug) {
    914       console.error(pattern, p, f)
    915     }
     902    this.debug(pattern, p, f)
    916903
    917904    // should be impossible.
     
    920907
    921908    if (p === GLOBSTAR) {
    922       if (options.debug)
    923         console.error('GLOBSTAR', [pattern, p, f])
     909      this.debug('GLOBSTAR', [pattern, p, f])
    924910
    925911      // "**"
     
    948934        , pr = pi + 1
    949935      if (pr === pl) {
    950         if (options.debug)
    951           console.error('** at the end')
     936        this.debug('** at the end')
    952937        // a ** at the end will just swallow the rest.
    953938        // We have found a match.
     
    967952        var swallowee = file[fr]
    968953
    969         if (options.debug) {
    970           console.error('\nglobstar while',
    971                         file, fr, pattern, pr, swallowee)
    972         }
     954        this.debug('\nglobstar while',
     955                    file, fr, pattern, pr, swallowee)
    973956
    974957        // XXX remove this slice.  Just pass the start index.
    975958        if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
    976           if (options.debug)
    977             console.error('globstar found match!', fr, fl, swallowee)
     959          this.debug('globstar found match!', fr, fl, swallowee)
    978960          // found a match.
    979961          return true
     
    983965          if (swallowee === "." || swallowee === ".." ||
    984966              (!options.dot && swallowee.charAt(0) === ".")) {
    985             if (options.debug)
    986               console.error("dot detected!", file, fr, pattern, pr)
     967            this.debug("dot detected!", file, fr, pattern, pr)
    987968            break WHILE
    988969          }
    989970
    990971          // ** swallows a segment, and continue.
    991           if (options.debug)
    992             console.error('globstar swallow a segment, and continue')
     972          this.debug('globstar swallow a segment, and continue')
    993973          fr ++
    994974        }
     
    999979      if (partial) {
    1000980        // ran out of file
    1001         // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
     981        this.debug("\n>>> no match, partial?", file, fr, pattern, pr)
    1002982        if (fr === fl) return true
    1003983      }
     
    1015995        hit = f === p
    1016996      }
    1017       if (options.debug) {
    1018         console.error("string match", p, f, hit)
    1019       }
     997      this.debug("string match", p, f, hit)
    1020998    } else {
    1021999      hit = f.match(p)
    1022       if (options.debug) {
    1023         console.error("pattern match", p, f, hit)
    1024       }
     1000      this.debug("pattern match", p, f, hit)
    10251001    }
    10261002
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json

    r484 r516  
    3030  "homepage": "https://github.com/isaacs/node-lru-cache",
    3131  "_id": "lru-cache@2.5.0",
    32   "dist": {
    33     "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69"
    34   },
    35   "_from": "lru-cache@2",
    36   "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz"
     32  "_from": "lru-cache@2"
    3733}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/package.json

    r484 r516  
    77  "name": "minimatch",
    88  "description": "a glob matcher in javascript",
    9   "version": "0.2.12",
     9  "version": "0.2.14",
    1010  "repository": {
    1111    "type": "git",
     
    1414  "main": "minimatch.js",
    1515  "scripts": {
    16     "test": "tap test"
     16    "test": "tap test/*.js"
    1717  },
    1818  "engines": {
     
    3030    "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
    3131  },
    32   "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.  **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n  Each row in the\n  array corresponds to a brace-expanded pattern.  Each item in the row\n  corresponds to a single path-part.  For example, the pattern\n  `{a,b/c}/d` would expand to a set of patterns like:\n\n        [ [ a, d ]\n        , [ b, c, d ] ]\n\n    If a portion of the pattern doesn't have any \"magic\" in it\n    (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n    will be left as a string rather than converted to a regular\n    expression.\n\n* `regexp` Created by the `makeRe` method.  A single regular expression\n  expressing the entire pattern.  This is useful in cases where you wish\n  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n  Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n  false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n  filename, and match it against a single row in the `regExpSet`.  This\n  method is mainly for internal use, but is exposed so that it can be\n  used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items.  So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export.  Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`.  Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob.  If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself.  When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes.  For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
     32  "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n  Each row in the\n  array corresponds to a brace-expanded pattern.  Each item in the row\n  corresponds to a single path-part.  For example, the pattern\n  `{a,b/c}/d` would expand to a set of patterns like:\n\n        [ [ a, d ]\n        , [ b, c, d ] ]\n\n    If a portion of the pattern doesn't have any \"magic\" in it\n    (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n    will be left as a string rather than converted to a regular\n    expression.\n\n* `regexp` Created by the `makeRe` method.  A single regular expression\n  expressing the entire pattern.  This is useful in cases where you wish\n  to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n  Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n  false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n  filename, and match it against a single row in the `regExpSet`.  This\n  method is mainly for internal use, but is exposed so that it can be\n  used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items.  So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export.  Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`.  Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob.  If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself.  When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes.  For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated.  Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally.  This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`.  Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything.  Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set.  This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part.  That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes.  For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`.  This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern.  Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity.  Since those two are valid, matching proceeds.\n",
    3333  "readmeFilename": "README.md",
    3434  "bugs": {
     
    3636  },
    3737  "homepage": "https://github.com/isaacs/minimatch",
    38   "_id": "minimatch@0.2.12",
    39   "_from": "minimatch@0.x.x"
     38  "_id": "minimatch@0.2.14",
     39  "_from": "minimatch@~0.2.12"
    4040}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/rimraf/README.md

    r484 r516  
    1 A `rm -rf` for node.
     1`rm -rf` for node.
    22
    33Install with `npm install rimraf`, or just drop rimraf.js somewhere.
     
    1010errors are handled for you:
    1111
    12 * `EBUSY` -  rimraf will back off a maximum of opts.maxBusyTries times
    13   before giving up.
    14 * `EMFILE` - If too many file descriptors get opened, rimraf will
    15   patiently wait until more become available.
    16 
     12* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
     13  `opts.maxBusyTries` times before giving up.
     14* `ENOENT` - If the file doesn't exist, rimraf will return
     15  successfully, since your desired outcome is already the case.
    1716
    1817## rimraf.sync
     
    2019It can remove stuff synchronously, too.  But that's not so good.  Use
    2120the async API.  It's better.
     21
     22## CLI
     23
     24If installed with `npm install rimraf -g` it can be used as a global
     25command `rimraf <path>` which is useful for cross platform support.
     26
     27## mkdirp
     28
     29If you need to create a directory recursively, check out
     30[mkdirp](https://github.com/substack/node-mkdirp).
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/rimraf/package.json

    r484 r516  
    11{
    22  "name": "rimraf",
    3   "version": "2.0.3",
     3  "version": "2.2.6",
    44  "main": "rimraf.js",
    55  "description": "A deep deletion module for node (like `rm -rf`)",
     
    1313    "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE"
    1414  },
    15   "optionalDependencies": {
    16     "graceful-fs": "~1.1"
    17   },
    1815  "repository": {
    1916    "type": "git",
     
    2219  "scripts": {
    2320    "test": "cd test && bash run.sh"
     21  },
     22  "bin": {
     23    "rimraf": "./bin.js"
    2424  },
    2525  "contributors": [
     
    4646    }
    4747  ],
    48   "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one.  Certain\nerrors are handled for you:\n\n* `EBUSY` -  rimraf will back off a maximum of opts.maxBusyTries times\n  before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n  patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too.  But that's not so good.  Use\nthe async API.  It's better.\n",
     48  "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one.  Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n  `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n  successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too.  But that's not so good.  Use\nthe async API.  It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n",
    4949  "readmeFilename": "README.md",
    5050  "bugs": {
     
    5252  },
    5353  "homepage": "https://github.com/isaacs/rimraf",
    54   "dependencies": {
    55     "graceful-fs": "~1.1"
     54  "_id": "rimraf@2.2.6",
     55  "dist": {
     56    "shasum": "c28d4de4cafcd392b82d02729509c65e3502240c"
    5657  },
    57   "_id": "rimraf@2.0.3",
    58   "_from": "rimraf@~2.0.3"
     58  "_from": "rimraf@~2.2.6",
     59  "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz"
    5960}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/rimraf/rimraf.js

    r484 r516  
    33
    44var path = require("path")
    5   , fs
    6 
    7 try {
    8   // optional dependency
    9   fs = require("graceful-fs")
    10 } catch (er) {
    11   fs = require("fs")
    12 }
    13 
    14 var lstat = "lstat"
    15 if (process.platform === "win32") {
    16   // not reliable on windows prior to 0.7.9
    17   var v = process.version.replace(/^v/, '').split(/\.|-/).map(Number)
    18   if (v[0] === 0 && (v[1] < 7 || v[1] == 7 && v[2] < 9)) {
    19     lstat = "stat"
    20   }
    21 }
    22 if (!fs[lstat]) lstat = "stat"
    23 var lstatSync = lstat + "Sync"
     5var fs = require("fs")
    246
    257// for EMFILE handling
     
    2810exports.BUSYTRIES_MAX = 3
    2911
     12var isWindows = (process.platform === "win32")
     13
    3014function rimraf (p, cb) {
    31 
    3215  if (!cb) throw new Error("No callback passed to rimraf()")
    3316
    3417  var busyTries = 0
    35 
    3618  rimraf_(p, function CB (er) {
    3719    if (er) {
    38       if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) {
     20      if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") &&
     21          busyTries < exports.BUSYTRIES_MAX) {
    3922        busyTries ++
    4023        var time = busyTries * 100
     
    6144}
    6245
     46// Two possible strategies.
     47// 1. Assume it's a file.  unlink it, then do the dir stuff on EPERM or EISDIR
     48// 2. Assume it's a directory.  readdir, then do the file stuff on ENOTDIR
     49//
     50// Both result in an extra syscall when you guess wrong.  However, there
     51// are likely far more normal files in the world than directories.  This
     52// is based on the assumption that a the average number of files per
     53// directory is >= 1.
     54//
     55// If anyone ever complains about this, then I guess the strategy could
     56// be made configurable somehow.  But until then, YAGNI.
    6357function rimraf_ (p, cb) {
    64   fs[lstat](p, function (er, s) {
     58  fs.unlink(p, function (er) {
    6559    if (er) {
    66       // already gone
    67       if (er.code === "ENOENT") return cb()
    68       // some other kind of error, permissions, etc.
    69       return cb(er)
     60      if (er.code === "ENOENT")
     61        return cb(null)
     62      if (er.code === "EPERM")
     63        return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb)
     64      if (er.code === "EISDIR")
     65        return rmdir(p, er, cb)
    7066    }
    71 
    72     return rm_(p, s, false, cb)
     67    return cb(er)
    7368  })
    7469}
    7570
    76 
    77 var myGid = function myGid () {
    78   var g = process.getgid && process.getgid()
    79   myGid = function myGid () { return g }
    80   return g
     71function fixWinEPERM (p, er, cb) {
     72  fs.chmod(p, 666, function (er2) {
     73    if (er2)
     74      cb(er2.code === "ENOENT" ? null : er)
     75    else
     76      fs.stat(p, function(er3, stats) {
     77        if (er3)
     78          cb(er3.code === "ENOENT" ? null : er)
     79        else if (stats.isDirectory())
     80          rmdir(p, er, cb)
     81        else
     82          fs.unlink(p, cb)
     83      })
     84  })
    8185}
    8286
    83 var myUid = function myUid () {
    84   var u = process.getuid && process.getuid()
    85   myUid = function myUid () { return u }
    86   return u
     87function fixWinEPERMSync (p, er, cb) {
     88  try {
     89    fs.chmodSync(p, 666)
     90  } catch (er2) {
     91    if (er2.code !== "ENOENT")
     92      throw er
     93  }
     94
     95  try {
     96    var stats = fs.statSync(p)
     97  } catch (er3) {
     98    if (er3 !== "ENOENT")
     99      throw er
     100  }
     101
     102  if (stats.isDirectory())
     103    rmdirSync(p, er)
     104  else
     105    fs.unlinkSync(p)
    87106}
    88107
    89 
    90 function writable (s) {
    91   var mode = s.mode || 0777
    92     , uid = myUid()
    93     , gid = myGid()
    94   return (mode & 0002)
    95       || (gid === s.gid && (mode & 0020))
    96       || (uid === s.uid && (mode & 0200))
     108function rmdir (p, originalEr, cb) {
     109  // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
     110  // if we guessed wrong, and it's not a directory, then
     111  // raise the original error.
     112  fs.rmdir(p, function (er) {
     113    if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
     114      rmkids(p, cb)
     115    else if (er && er.code === "ENOTDIR")
     116      cb(originalEr)
     117    else
     118      cb(er)
     119  })
    97120}
    98121
    99 function rm_ (p, s, didWritableCheck, cb) {
    100   if (!didWritableCheck && !writable(s)) {
    101     // make file writable
    102     // user/group/world, doesn't matter at this point
    103     // since it's about to get nuked.
    104     return fs.chmod(p, s.mode | 0222, function (er) {
    105       if (er) return cb(er)
    106       rm_(p, s, true, cb)
    107     })
    108   }
    109 
    110   if (!s.isDirectory()) {
    111     return fs.unlink(p, cb)
    112   }
    113 
    114   // directory
     122function rmkids(p, cb) {
    115123  fs.readdir(p, function (er, files) {
    116     if (er) return cb(er)
    117     asyncForEach(files.map(function (f) {
    118       return path.join(p, f)
    119     }), function (file, cb) {
    120       rimraf(file, cb)
    121     }, function (er) {
    122       if (er) return cb(er)
    123       fs.rmdir(p, cb)
     124    if (er)
     125      return cb(er)
     126    var n = files.length
     127    if (n === 0)
     128      return fs.rmdir(p, cb)
     129    var errState
     130    files.forEach(function (f) {
     131      rimraf(path.join(p, f), function (er) {
     132        if (errState)
     133          return
     134        if (er)
     135          return cb(errState = er)
     136        if (--n === 0)
     137          fs.rmdir(p, cb)
     138      })
    124139    })
    125140  })
    126141}
    127142
    128 function asyncForEach (list, fn, cb) {
    129   if (!list.length) cb()
    130   var c = list.length
    131     , errState = null
    132   list.forEach(function (item, i, list) {
    133     fn(item, function (er) {
    134       if (errState) return
    135       if (er) return cb(errState = er)
    136       if (-- c === 0) return cb()
    137     })
    138   })
     143// this looks simpler, and is strictly *faster*, but will
     144// tie up the JavaScript thread and fail on excessively
     145// deep directory trees.
     146function rimrafSync (p) {
     147  try {
     148    fs.unlinkSync(p)
     149  } catch (er) {
     150    if (er.code === "ENOENT")
     151      return
     152    if (er.code === "EPERM")
     153      return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er)
     154    if (er.code !== "EISDIR")
     155      throw er
     156    rmdirSync(p, er)
     157  }
    139158}
    140159
    141 // this looks simpler, but it will fail with big directory trees,
    142 // or on slow stupid awful cygwin filesystems
    143 function rimrafSync (p) {
     160function rmdirSync (p, originalEr) {
    144161  try {
    145     var s = fs[lstatSync](p)
     162    fs.rmdirSync(p)
    146163  } catch (er) {
    147     if (er.code === "ENOENT") return
    148     throw er
     164    if (er.code === "ENOENT")
     165      return
     166    if (er.code === "ENOTDIR")
     167      throw originalEr
     168    if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
     169      rmkidsSync(p)
    149170  }
     171}
    150172
    151   if (!writable(s)) {
    152     fs.chmodSync(p, s.mode | 0222)
    153   }
    154 
    155   if (!s.isDirectory()) return fs.unlinkSync(p)
    156 
     173function rmkidsSync (p) {
    157174  fs.readdirSync(p).forEach(function (f) {
    158175    rimrafSync(path.join(p, f))
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/underscore.string/package.json

    r484 r516  
    6969  "readmeFilename": "README.markdown",
    7070  "_id": "underscore.string@2.2.1",
    71   "dist": {
    72     "shasum": "2aa155e7c49bcbfd88ec69b8c9694d885385c717"
    73   },
    74   "_from": "underscore.string@~2.2.1",
    75   "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz"
     71  "_from": "underscore.string@~2.2.1"
    7672}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/package.json

    r484 r516  
    22  "name": "grunt",
    33  "description": "The JavaScript Task Runner",
    4   "version": "0.4.2",
     4  "version": "0.4.4",
    55  "author": {
    66    "name": "\"Cowboy\" Ben Alman",
     
    5959    "minimatch": "~0.2.12",
    6060    "nopt": "~1.0.10",
    61     "rimraf": "~2.0.3",
     61    "rimraf": "~2.2.6",
    6262    "lodash": "~0.9.2",
    6363    "underscore.string": "~2.2.1",
     
    6565    "js-yaml": "~2.0.5",
    6666    "exit": "~0.1.1",
    67     "getobject": "~0.1.0"
     67    "getobject": "~0.1.0",
     68    "grunt-legacy-util": "~0.1.2"
    6869  },
    6970  "devDependencies": {
     
    7677    "shelljs": "~0.2.5"
    7778  },
    78   "readme": "# Grunt: The JavaScript Task Runner [![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",
     79  "readme": "# Grunt: The JavaScript Task Runner\n\n[![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)\n[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",
    7980  "readmeFilename": "README.md",
    80   "_id": "grunt@0.4.2",
     81  "_id": "grunt@0.4.4",
    8182  "dist": {
    82     "shasum": "1f6804f00e977dd90b9f97b1faed480215db0857"
     83    "shasum": "64f477fef801475ab92f1819a691c6c71b72902e"
    8384  },
    84   "_from": "grunt@0.4.2",
    85   "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.2.tgz"
     85  "_from": "grunt@0.4.4",
     86  "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.4.tgz"
    8687}
  • Dev/trunk/node_modules/grunt-amd-check/node_modules/underscore/package.json

    r484 r516  
    3232  },
    3333  "_id": "underscore@1.4.4",
    34   "_from": "underscore@1.4.4",
    35   "dist": {
    36     "shasum": "3e7ceb21f205bc19964685e1fdd52c8f77773674"
    37   },
    38   "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz"
     34  "_from": "underscore@1.4.4"
    3935}
  • Dev/trunk/node_modules/grunt-amd-check/package.json

    r484 r516  
    3333  },
    3434  "_from": "grunt-amd-check@",
    35   "_resolved": "https://registry.npmjs.org/grunt-amd-check/-/grunt-amd-check-0.5.2.tgz"
     35  "_resolved": "https://registry.npmjs.org/grunt-amd-check/-/grunt-amd-check-0.5.2.tgz",
     36  "devDependencies": {
     37    "underscore": "^1.4.4",
     38    "grunt": "^0.4.4"
     39  }
    3640}
Note: See TracChangeset for help on using the changeset viewer.