gulp-symlink
Advanced tools
Comparing version
@@ -13,2 +13,5 @@ /* jshint node:true */ | ||
return map(function(file, cb) { | ||
if (typeof out === 'undefined') { | ||
cb(new Error('gulp-symlink: A destination folder is required.')); | ||
} | ||
var dest = process.cwd() + path.sep + out; | ||
@@ -15,0 +18,0 @@ var sym = path.resolve(file.path, dest) + path.sep + path.basename(file.path); |
{ | ||
"name": "gulp-symlink", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Create symlinks during your gulp build.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
11
test.js
@@ -20,2 +20,13 @@ /* jshint node: true */ | ||
describe('gulp-symlink', function() { | ||
it('should throw if no directory was specified', function(cb) { | ||
var stream = symlink(); | ||
try { | ||
stream.write(new gutil.File({ | ||
path: process.cwd() + path.sep + testFile | ||
})); | ||
} catch (e) { | ||
expect(e.toString()).to.contain.string('A destination folder is required.'); | ||
cb(); | ||
} | ||
}); | ||
it('should create symlinks', function(cb) { | ||
@@ -22,0 +33,0 @@ var stream = symlink(testDir); |
6092
9.1%97
16.87%