diff options
Diffstat (limited to 'node_modules/vinyl')
9 files changed, 251 insertions, 0 deletions
| diff --git a/node_modules/vinyl/node_modules/clone-stats/LICENSE.md b/node_modules/vinyl/node_modules/clone-stats/LICENSE.md new file mode 100644 index 000000000..146cb32a7 --- /dev/null +++ b/node_modules/vinyl/node_modules/clone-stats/LICENSE.md @@ -0,0 +1,21 @@ +## The MIT License (MIT) ## + +Copyright (c) 2014 Hugh Kennedy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/vinyl/node_modules/clone-stats/README.md b/node_modules/vinyl/node_modules/clone-stats/README.md new file mode 100644 index 000000000..8b12b6fa5 --- /dev/null +++ b/node_modules/vinyl/node_modules/clone-stats/README.md @@ -0,0 +1,17 @@ +# clone-stats [](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[](http://github.com/hughsk/stability-badges) # + +Safely clone node's +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without +losing their class methods, i.e. `stat.isDirectory()` and co. + +## Usage ## + +[](https://nodei.co/npm/clone-stats) + +### `copy = require('clone-stats')(stat)` ### + +Returns a clone of the original `fs.Stats` instance (`stat`). + +## License ## + +MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/node_modules/vinyl/node_modules/clone-stats/index.js b/node_modules/vinyl/node_modules/clone-stats/index.js new file mode 100644 index 000000000..e797cfe6e --- /dev/null +++ b/node_modules/vinyl/node_modules/clone-stats/index.js @@ -0,0 +1,13 @@ +var Stat = require('fs').Stats + +module.exports = cloneStats + +function cloneStats(stats) { +  var replacement = new Stat + +  Object.keys(stats).forEach(function(key) { +    replacement[key] = stats[key] +  }) + +  return replacement +} diff --git a/node_modules/vinyl/node_modules/clone-stats/package.json b/node_modules/vinyl/node_modules/clone-stats/package.json new file mode 100644 index 000000000..acef8550c --- /dev/null +++ b/node_modules/vinyl/node_modules/clone-stats/package.json @@ -0,0 +1,31 @@ +{ +  "name": "clone-stats", +  "description": "Safely clone node's fs.Stats instances without losing their class methods", +  "version": "1.0.0", +  "main": "index.js", +  "browser": "index.js", +  "dependencies": {}, +  "devDependencies": { +    "tape": "~2.3.2" +  }, +  "scripts": { +    "test": "node test" +  }, +  "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)", +  "license": "MIT", +  "repository": { +    "type": "git", +    "url": "git://github.com/hughsk/clone-stats" +  }, +  "bugs": { +    "url": "https://github.com/hughsk/clone-stats/issues" +  }, +  "homepage": "https://github.com/hughsk/clone-stats", +  "keywords": [ +    "stats", +    "fs", +    "clone", +    "copy", +    "prototype" +  ] +} diff --git a/node_modules/vinyl/node_modules/clone-stats/test.js b/node_modules/vinyl/node_modules/clone-stats/test.js new file mode 100644 index 000000000..e4bb2814d --- /dev/null +++ b/node_modules/vinyl/node_modules/clone-stats/test.js @@ -0,0 +1,36 @@ +var test = require('tape') +var clone = require('./') +var fs = require('fs') + +test('file', function(t) { +  compare(t, fs.statSync(__filename)) +  t.end() +}) + +test('directory', function(t) { +  compare(t, fs.statSync(__dirname)) +  t.end() +}) + +function compare(t, stat) { +  var copy = clone(stat) + +  t.deepEqual(stat, copy, 'clone has equal properties') +  t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') +  t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') + +  ;['isDirectory' +  , 'isFile' +  , 'isBlockDevice' +  , 'isCharacterDevice' +  , 'isSymbolicLink' +  , 'isFIFO' +  , 'isSocket' +  ].forEach(function(method) { +    t.equal( +        stat[method].call(stat) +      , copy[method].call(copy) +      , 'equal value for stat.' + method + '()' +    ) +  }) +} diff --git a/node_modules/vinyl/node_modules/replace-ext/LICENSE b/node_modules/vinyl/node_modules/replace-ext/LICENSE new file mode 100755 index 000000000..fd38d6935 --- /dev/null +++ b/node_modules/vinyl/node_modules/replace-ext/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/vinyl/node_modules/replace-ext/README.md b/node_modules/vinyl/node_modules/replace-ext/README.md new file mode 100644 index 000000000..8775983b7 --- /dev/null +++ b/node_modules/vinyl/node_modules/replace-ext/README.md @@ -0,0 +1,50 @@ +<p align="center"> +  <a href="http://gulpjs.com"> +    <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png"> +  </a> +</p> + +# replace-ext + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Replaces a file extension with another one. + +## Usage + +```js +var replaceExt = require('replace-ext'); + +var path = '/some/dir/file.js'; +var newPath = replaceExt(path, '.coffee'); + +console.log(newPath); // /some/dir/file.coffee +``` + +## API + +### `replaceExt(path, extension)` + +Replaces the extension from `path` with `extension` and returns the updated path string. + +Does not replace the extension if `path` is not a string or is empty. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg +[npm-url]: https://www.npmjs.com/package/replace-ext +[npm-image]: http://img.shields.io/npm/v/replace-ext.svg + +[travis-url]: https://travis-ci.org/gulpjs/replace-ext +[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/vinyl/node_modules/replace-ext/index.js b/node_modules/vinyl/node_modules/replace-ext/index.js new file mode 100644 index 000000000..7cb7789e2 --- /dev/null +++ b/node_modules/vinyl/node_modules/replace-ext/index.js @@ -0,0 +1,18 @@ +'use strict'; + +var path = require('path'); + +function replaceExt(npath, ext) { +  if (typeof npath !== 'string') { +    return npath; +  } + +  if (npath.length === 0) { +    return npath; +  } + +  var nFileName = path.basename(npath, path.extname(npath)) + ext; +  return path.join(path.dirname(npath), nFileName); +} + +module.exports = replaceExt; diff --git a/node_modules/vinyl/node_modules/replace-ext/package.json b/node_modules/vinyl/node_modules/replace-ext/package.json new file mode 100644 index 000000000..27dbe3104 --- /dev/null +++ b/node_modules/vinyl/node_modules/replace-ext/package.json @@ -0,0 +1,44 @@ +{ +  "name": "replace-ext", +  "version": "1.0.0", +  "description": "Replaces a file extension with another one", +  "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)", +  "contributors": [ +    "Eric Schoffstall <yo@contra.io>", +    "Blaine Bublitz <blaine.bublitz@gmail.com>" +  ], +  "repository": "gulpjs/replace-ext", +  "license": "MIT", +  "engines": { +    "node": ">= 0.10" +  }, +  "main": "index.js", +  "files": [ +    "LICENSE", +    "index.js" +  ], +  "scripts": { +    "lint": "eslint . && jscs index.js test/", +    "pretest": "npm run lint", +    "test": "mocha --async-only", +    "cover": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly", +    "coveralls": "npm run cover && istanbul-coveralls" +  }, +  "dependencies": {}, +  "devDependencies": { +    "eslint": "^1.10.3", +    "eslint-config-gulp": "^2.0.0", +    "expect": "^1.16.0", +    "istanbul": "^0.4.3", +    "istanbul-coveralls": "^1.0.3", +    "jscs": "^2.3.5", +    "jscs-preset-gulp": "^1.0.0", +    "mocha": "^2.4.5" +  }, +  "keywords": [ +    "gulp", +    "extensions", +    "filepath", +    "basename" +  ] +} | 
