diff options
Diffstat (limited to 'node_modules/gulp-sym')
-rw-r--r-- | node_modules/gulp-sym/.jshintrc | 6 | ||||
-rw-r--r-- | node_modules/gulp-sym/.npmignore | 25 | ||||
-rw-r--r-- | node_modules/gulp-sym/.travis.yml | 4 | ||||
-rw-r--r-- | node_modules/gulp-sym/CHANGELOG.md | 2 | ||||
-rw-r--r-- | node_modules/gulp-sym/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/gulp-sym/README.md | 110 | ||||
-rw-r--r-- | node_modules/gulp-sym/appveyor.yml | 39 | ||||
-rw-r--r-- | node_modules/gulp-sym/index.js | 88 | ||||
l--------- | node_modules/gulp-sym/node_modules/.bin/mkdirp | 1 | ||||
l--------- | node_modules/gulp-sym/node_modules/.bin/rimraf | 1 | ||||
-rw-r--r-- | node_modules/gulp-sym/package.json | 35 | ||||
-rw-r--r-- | node_modules/gulp-sym/test/fixtures/links/.gitkeep | 0 | ||||
-rw-r--r-- | node_modules/gulp-sym/test/fixtures/test | 1 | ||||
-rw-r--r-- | node_modules/gulp-sym/test/fixtures/test_dir/.gitkeep | 0 | ||||
-rw-r--r-- | node_modules/gulp-sym/test/index.js | 283 |
15 files changed, 0 insertions, 616 deletions
diff --git a/node_modules/gulp-sym/.jshintrc b/node_modules/gulp-sym/.jshintrc deleted file mode 100644 index 3fbbda486..000000000 --- a/node_modules/gulp-sym/.jshintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "asi": true, - "laxbreak": true, - "laxcomma": true, - "node": true -}
\ No newline at end of file diff --git a/node_modules/gulp-sym/.npmignore b/node_modules/gulp-sym/.npmignore deleted file mode 100644 index da23d0d4b..000000000 --- a/node_modules/gulp-sym/.npmignore +++ /dev/null @@ -1,25 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Deployed apps should consider commenting this line out: -# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git -node_modules diff --git a/node_modules/gulp-sym/.travis.yml b/node_modules/gulp-sym/.travis.yml deleted file mode 100644 index b278bdb2e..000000000 --- a/node_modules/gulp-sym/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "6" - - "7" diff --git a/node_modules/gulp-sym/CHANGELOG.md b/node_modules/gulp-sym/CHANGELOG.md deleted file mode 100644 index 9bfba86e2..000000000 --- a/node_modules/gulp-sym/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -#0.0.14 -Added relative option diff --git a/node_modules/gulp-sym/LICENSE b/node_modules/gulp-sym/LICENSE deleted file mode 100644 index d132a99b8..000000000 --- a/node_modules/gulp-sym/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 soyuka - -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.
\ No newline at end of file diff --git a/node_modules/gulp-sym/README.md b/node_modules/gulp-sym/README.md deleted file mode 100644 index 27395cf23..000000000 --- a/node_modules/gulp-sym/README.md +++ /dev/null @@ -1,110 +0,0 @@ -gulp-sym -======== - -[](https://travis-ci.org/soyuka/gulp-sym) -[](https://ci.appveyor.com/project/soyuka/gulp-sym) -[](https://david-dm.org/soyuka/gulp-sym) -[](http://badge.fury.io/js/gulp-sym) -[](https://codeclimate.com/github/soyuka/gulp-sym) -[](https://codeclimate.com/github/soyuka/gulp-sym) - -> Gulp symlink module - -# Deprecation warning -In favor of https://github.com/ben-eb/gulp-symlink See https://github.com/ben-eb/gulp-symlink/issues/15 - -# Installation - -``` -npm install gulp-sym --save-dev {--production} -``` - -# Usage - -## Simple example - -```javascript -var symlink = require('gulp-sym') - -gulp - .src('source') - .pipe(symlink('path/to/link')) - //note that it'll return source streams not the symlink ones - -``` - -## Advanced example - -```javascript -var symlink = require('gulp-sym') - , p = require('path') - , File = require('gulp-util').File - -gulp - .src(['path/**/to/some/dir/', '!path/example/to/some/dir']) - //source is a vinyl instance - .pipe(symlink(function(source) { - - //for example link source is my/dest/path/dirname where dirname matches the glob pattern - return p.join('my/dest/path', source.relative.split(p.sep)[0]) - - //you might also return a vinyl instance if you wanted a different cwd - return new File({cwd: '/home', path: './symlink'}) - - }, { force: true })) //use force option to replace existant -``` - -## Options - -- `force` (bool): force overwrite symlink -- `relative` (bool): your link will be relative - -### /!\ Don't do this ... - -If you're working on more than 1 source, use a function or an array to specify the destination path so `gulp-sym` doesn't override the previous symlink! - -Here is a counterexample, `dest` will be a link to `source/path/two` and the first one will not have any symlink! - -```javascript -gulp - .src(['source/path/one', 'source/path/two']) - .pipe(symlink('dest', {force: true})) //bad shit WILL happen - -``` - -### ... but this - -That's how it should be: -```javascript -gulp - .src(['source/path/one', 'source/path/two']) - .pipe(symlink(['dest/one', 'dest/two'])) - -``` -or through a function that'll be called on each source - -```javascript -gulp - .src(['source/path/one', 'source/path/two']) - .pipe(symlink(function(source) { - return p.resolve(source.path, '../../dest', p.basename(source.path)) - }) - -``` - -It's intendend behavior and api will not change for this, I could warn the user in this case - to be discussed. - -# Why? - -I'm aware that there is another [symlink](https://github.com/ben-eb/gulp-symlink) module for gulp but as of v0.1.0 it didn't fit my needs and seems to get messy (absolute/relative). In this plugin, `paths` are always absolute and resolves from the `cwd` that you might change by passing a [vinyl](https://github.com/wearefractal/vinyl) instance to the destination function. - -[gulp-symlink](https://github.com/ben-eb/gulp-symlink) : -- has no force option to replace existing link -- uses [fs.symlink twice](https://github.com/ben-eb/gulp-symlink/blob/master/index.js#L54) instead of using `fs.exists`. I'm aware of the nodejs docs specifying that `fs.exists` is there on an historical purpose only but why shouldn't we use it? -- doesn't use the specified type option mentioned in the [nodejs docs](http://nodejs.org/api/fs.html#fs_fs_symlink_srcpath_dstpath_type_callback) (windows only) -- has no test on symlinking directories (maybe why tests are good to go on windows) -- has bad support on multiple sources (at the moment) - -# Licence - -MIT diff --git a/node_modules/gulp-sym/appveyor.yml b/node_modules/gulp-sym/appveyor.yml deleted file mode 100644 index 8c368de65..000000000 --- a/node_modules/gulp-sym/appveyor.yml +++ /dev/null @@ -1,39 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml - -# Fix line endings in Windows. (runs before repo cloning) -init: - - git config --global core.autocrlf input - -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "0.10" - - nodejs_version: "0.11" - -# Allow failing jobs for bleeding-edge Node.js versions. -matrix: - allow_failures: - - nodejs_version: "0.11" - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node 0.STABLE.latest - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) - # Typical npm stuff. - - npm install - - npm install gulp -g -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # We test multiple Windows shells because of prior stdout buffering issues - # filed against Grunt. https://github.com/joyent/node/issues/3584 - - ps: "npm test # PowerShell" # Pass comment to PS for easier debugging - - cmd: npm test - -# Don't actually build. -build: off - -# Set build version format here instead of in the admin panel. -version: "{build}" diff --git a/node_modules/gulp-sym/index.js b/node_modules/gulp-sym/index.js deleted file mode 100644 index 1fc2b3777..000000000 --- a/node_modules/gulp-sym/index.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict' -const through = require('through2') -const fs = require('fs') -const p = require('path') -const rm = require('rimraf') -const mkdirp = require('mkdirp') -const gutil = require('gulp-util') -const PluginError = gutil.PluginError -const File = gutil.File -const existsSync = require('@soyuka/exists-sync') -const PLUGIN_NAME = 'gulp-sym' - -// Plugin level function(dealing with files) -function gulpSymlink(dest, options) { - - options = typeof options == 'object' ? options : {} - options.force = options.force === undefined ? false : options.force - - if (!dest) { - throw new PluginError({plugin: PLUGIN_NAME, message: "Missing destination link"}) - } - - if(dest instanceof Array) { - //copy array because we'll shift values - var destinations = dest.slice() - } - - var stream = through.obj(function(source, enc, callback) { - - var self = this, symlink - - //resolving absolute path from source - source.path = p.resolve(source.cwd, source.path) - // source.relative = p.relative(source.cwd, source.path) - - //Array of destinations is passed - symlink = destinations !== undefined ? destinations.shift() : dest - - //if dest is a function simply call it - symlink = typeof dest == 'function' ? dest(source) : symlink - - //is the previous result a File instance ? - symlink = symlink instanceof File ? symlink : new File({path: symlink}) - - //resolving absolute path from dest - symlink.path = p.resolve(symlink.cwd, symlink.path) - - //relative path between source and link - var relative_symlink_source = p.relative(p.dirname(symlink.path), source.path) - - //check if the destination path exists - var exists = existsSync(symlink.path) - - //No force option, we can't override! - if(exists && !options.force) { - this.emit('error', new PluginError({plugin: PLUGIN_NAME, message: 'Destination file exists ('+dest+') - use force option to replace'})) - this.push(source) - return callback() - - } - - //remove destination if force option - if(exists && options.force === true) - rm.sync(symlink.path) //I'm aware that this is bad \o/ - - //create destination directories - if(!fs.existsSync(p.dirname(symlink.path))) - mkdirp.sync(p.dirname(symlink.path)) - - //this is a windows check as specified in http://nodejs.org/api/fs.html#fs_fs_symlink_srcpath_dstpath_type_callback - source.stat = fs.statSync(source.path) - - fs.symlink(options.relative ? relative_symlink_source : source.path, symlink.path, source.stat.isDirectory() ? 'dir' : 'file', function(err) { - - if(err) - self.emit('error', new PluginError({plugin: PLUGIN_NAME, message: err})) - else - gutil.log(PLUGIN_NAME + ':', gutil.colors.yellow(symlink.path), '→', gutil.colors.blue(options.relative ? relative_symlink_source : source.path)) - - self.push(source) - callback() - }) - }) - - return stream -} - -module.exports = gulpSymlink diff --git a/node_modules/gulp-sym/node_modules/.bin/mkdirp b/node_modules/gulp-sym/node_modules/.bin/mkdirp deleted file mode 120000 index 91a5f623f..000000000 --- a/node_modules/gulp-sym/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../../../mkdirp/bin/cmd.js
\ No newline at end of file diff --git a/node_modules/gulp-sym/node_modules/.bin/rimraf b/node_modules/gulp-sym/node_modules/.bin/rimraf deleted file mode 120000 index 632d6da23..000000000 --- a/node_modules/gulp-sym/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../../../rimraf/bin.js
\ No newline at end of file diff --git a/node_modules/gulp-sym/package.json b/node_modules/gulp-sym/package.json deleted file mode 100644 index 590dea962..000000000 --- a/node_modules/gulp-sym/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "gulp-sym", - "version": "1.0.2", - "description": "Gulp symlink", - "main": "index.js", - "scripts": { - "test": "mocha --reporter spec test/index.js" - }, - "keywords": [ - "gulpplugin", - "symlink", - "gulp-symlink" - ], - "author": "soyuka", - "license": "MIT", - "dependencies": { - "@soyuka/exists-sync": "^1.0.1", - "gulp-util": "^3.0.7", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "through2": "^2.0.3" - }, - "devDependencies": { - "chai": "^3.5.0", - "mocha": "^3.2.0", - "async": "^2.1.4" - }, - "repository": { - "type": "git", - "url": "https://github.com/soyuka/gulp-sym" - }, - "bugs": { - "url": "https://github.com/soyuka/gulp-sym/issues" - } -} diff --git a/node_modules/gulp-sym/test/fixtures/links/.gitkeep b/node_modules/gulp-sym/test/fixtures/links/.gitkeep deleted file mode 100644 index e69de29bb..000000000 --- a/node_modules/gulp-sym/test/fixtures/links/.gitkeep +++ /dev/null diff --git a/node_modules/gulp-sym/test/fixtures/test b/node_modules/gulp-sym/test/fixtures/test deleted file mode 100644 index 95d09f2b1..000000000 --- a/node_modules/gulp-sym/test/fixtures/test +++ /dev/null @@ -1 +0,0 @@ -hello world
\ No newline at end of file diff --git a/node_modules/gulp-sym/test/fixtures/test_dir/.gitkeep b/node_modules/gulp-sym/test/fixtures/test_dir/.gitkeep deleted file mode 100644 index e69de29bb..000000000 --- a/node_modules/gulp-sym/test/fixtures/test_dir/.gitkeep +++ /dev/null diff --git a/node_modules/gulp-sym/test/index.js b/node_modules/gulp-sym/test/index.js deleted file mode 100644 index 67a671857..000000000 --- a/node_modules/gulp-sym/test/index.js +++ /dev/null @@ -1,283 +0,0 @@ -var expect = require('chai').expect - , fs = require('fs') - , p = require('path') - , gutil = require('gulp-util') - , symlink = require('../') - , file, dir - , rm = require('rimraf') - , async = require('async') - -describe('gulp-symlink', function() { - - before(function() { - - file = new gutil.File({ - path: './test/fixtures/test', - base: './test/fixtures/', - }) - dir = new gutil.File({ - path: './test/fixtures/test_dir', - base: './test/fixtures/', - }) - }) - - it('should throw with no destination symlink', function(cb) { - try { - var stream = symlink() - } catch(e) { - expect(e).not.to.be.null - expect(e.message).to.contain('Missing destination link') - cb() - } - }) - - it('should symlink file', function(cb) { - var dest = './test/fixtures/links/test' - , stream = symlink(dest) - - stream.on('data', function(newFile){ - expect(newFile).to.equal(file) - }) - - stream.once('end', function() { - - fs.readFile(dest, function(err, f) { - expect(err).to.be.null - expect(f.toString()).to.equal(fs.readFileSync(file.path).toString()) - - fs.lstat(dest, function(err, stats) { - expect(stats.isSymbolicLink()).to.be.true - cb() - }) - - }) - - }) - - stream.write(file) - stream.end() - }) - - it('should emit error because symlink exists', function(cb) { - var dest = './test/fixtures/links/test' - , stream = symlink(dest) - - stream.on('data', function(newFile){ - expect(newFile).to.equal(file) - }) - - stream.once('end', function() { - cb() - }) - - stream.on('error', function(e) { - expect(e).not.to.be.null - expect(e.message).to.contain('Destination file exists') - }) - - stream.write(file) - stream.end() - - }) - - it('should overwrite symlink', function(cb) { - var dest = './test/fixtures/links/test' - , stream = symlink(dest, {force: true}) - - stream.on('data', function(newDir){ }) - - stream.once('end', function() { - fs.readFile(dest, function(err, f) { - expect(err).to.be.null - expect(f.toString()).to.equal(fs.readFileSync(file.path).toString()) - - fs.lstat(dest, function(err, stats) { - expect(stats.isSymbolicLink()).to.be.true - - rm(dest, function() { - cb() - }) - }) - - }) - }) - - stream.write(file) - stream.end() - - }) - - it('should symlink through File instance', function(cb) { - - var dest = './test/fixtures/links/test' - , stream = symlink(new gutil.File({cwd: process.cwd(), path: dest})) - - stream.on('data', function(newFile){ }) - - stream.once('end', function() { - fs.readFile(dest, function(err, f) { - expect(err).to.be.null - expect(f.toString()).to.equal(fs.readFileSync(file.path).toString()) - - fs.lstat(dest, function(err, stats) { - expect(stats.isSymbolicLink()).to.be.true - - rm(dest, function() { - cb() - }) - }) - - }) - }) - - stream.write(file) - stream.end() - - }) - - it('should symlink a directory', function(cb) { - var dest = './test/fixtures/links/test' - , stream = symlink(dest) - - stream.on('data', function(newDir){ }) - - stream.once('end', function() { - - fs.exists(dest, function(exists) { - expect(exists).to.be.true - - fs.lstat(dest, function(err, stats) { - expect(stats.isSymbolicLink()).to.be.true - - fs.stat(dest, function(err, stats) { - expect(stats.isDirectory()).to.be.true - - rm(dest, function() { - cb() - }) - }) - }) - - }) - - }) - - stream.write(dir) - stream.end() - }) - - it('should symlink within a non-existent directory', function(cb) { - var dest = './test/fixtures/links/test/directory/symlink' - //testing function call - var stream = symlink(function(file) { - return p.resolve(file.path, '../../fixtures/links/test/directory/symlink') - }) - - stream.on('data', function(newFile){ - expect(newFile).to.equal(file) - }) - - stream.once('end', function() { - - fs.readFile(dest, function(err, f) { - expect(err).to.be.null - expect(f.toString()).to.equal(fs.readFileSync(file.path).toString()) - - fs.lstat(dest, function(err, stats) { - expect(stats.isSymbolicLink()).to.be.true - - rm('./test/fixtures/links/test', function() { - cb() - }) - }) - - }) - - }) - - stream.write(file) - stream.end() - }) - - it('should symlink 2 sources to 2 different destinations [array]', function(cb) { - - var dests = ['./test/fixtures/links/test', './test/fixtures/links/test_dir'] - - var stream = symlink(dests) - - stream.on('data', function(data) { - }) - - stream.on('end', function() { - - for(var j in dests) - expect(fs.existsSync(dests[j])).to.be.true - - async.map(dests, rm, cb) - }) - - stream.write(file) - stream.write(dir) - stream.end() - }) - - - it('should symlink 2 sources to 2 different destinations [function]', function(cb) { - - var dests = ['./test/fixtures/links/test', './test/fixtures/links/test_dir'] - var i = 0 - var stream = symlink(function(source) { - i++ //make sure this is called 2 times - return p.resolve(source.path, '../../fixtures/links', p.basename(source.path)) - }) - - stream.on('data', function(data) { - }) - - stream.on('end', function() { - - for(var j in dests) - expect(fs.existsSync(dests[j])).to.be.true - - expect(i).to.equal(2) - - async.map(dests, rm, cb) - }) - - stream.write(file) - stream.write(dir) - stream.end() - }) - - //Do we really want 100% coverage? - - it('should emit an error on symlink creation', function(cb) { - - fs.mkdirSync('./test/fixtures/badlinks', 600) - - var dest = './test/fixtures/badlinks/test' - , stream = symlink(dest) - - stream.on('data', function(newDir){ }) - - stream.once('end', function() { - rm.sync('./test/fixtures/badlinks') - - //windows fs.mkdirSync has wrong rights, I'm cheating there... - if(require('os').platform() == 'win32') - cb() - }) - - stream.on('error', function(e) { - expect(e).not.to.be.null - expect(e).to.be.an.instanceof(Error) - cb() - - }) - - stream.write(dir) - stream.end() - - }) - -}) |