gulp-inject-string
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -10,3 +10,3 @@ /* | ||
var es = require('event-stream'), | ||
gutil = require('gulp-util'); | ||
PluginError = require('plugin-error'); | ||
@@ -18,3 +18,3 @@ var stream = function(injectMethod){ | ||
} catch (err) { | ||
return cb(new gutil.PluginError('gulp-inject-string', err)); | ||
return cb(new PluginError('gulp-inject-string', err)); | ||
} | ||
@@ -21,0 +21,0 @@ cb(null, file); |
{ | ||
"name": "gulp-inject-string", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Inject snippets in build", | ||
@@ -32,8 +32,9 @@ "main": "index.js", | ||
"istanbul": "^0.4.0", | ||
"mocha": "^2.3.4" | ||
"mocha": "^2.3.4", | ||
"vinyl": "^2.1.0" | ||
}, | ||
"dependencies": { | ||
"event-stream": "^3.1.7", | ||
"gulp-util": "^3.0.0" | ||
"plugin-error": "^0.1.2" | ||
} | ||
} |
# gulp-inject-string | ||
[![Build Status](https://travis-ci.org/Schmicko/gulp-inject-string.svg?branch=master)](https://travis-ci.org/Schmicko/gulp-inject-string) | ||
[![Build Status](https://travis-ci.org/mikehazell/gulp-inject-string.svg?branch=master)](https://travis-ci.org/mikehazell/gulp-inject-string) | ||
[![NPM version](https://badge.fury.io/js/gulp-inject-string.svg)](http://badge.fury.io/js/gulp-inject-string) | ||
@@ -23,3 +23,3 @@ | ||
See [examples/build](https://github.com/Schmicko/gulp-inject-string/tree/master/examples/build) for output. | ||
See [examples/build](https://github.com/mikehazell/gulp-inject-string/tree/master/examples/build) for output. | ||
@@ -26,0 +26,0 @@ ```js |
var fs = require('fs'), | ||
path = require('path'), | ||
gutil = require('gulp-util'), | ||
os = require('os'), | ||
Vinyl = require('vinyl'), | ||
mocha = require('mocha'), | ||
@@ -46,3 +47,3 @@ expect = require('chai').expect, | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -73,3 +74,3 @@ cwd: 'test/', | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -100,3 +101,3 @@ cwd: 'test/', | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -127,3 +128,3 @@ cwd: 'test/', | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -168,3 +169,3 @@ cwd: 'test', | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -208,3 +209,3 @@ cwd: 'test', | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -244,3 +245,3 @@ cwd: 'test', | ||
it('should work for a match at the first character in the target', function(done){ | ||
var stream = inject.beforeEach('<!doctype', '<!-- this is a poor example but should still work -->\n'); | ||
var stream = inject.beforeEach('<!doctype', '<!-- this is a poor example but should still work -->' + os.EOL); | ||
var expectedFile = fs.readFileSync( path.join(__dirname, './expected/beforeEach2.html')); | ||
@@ -263,3 +264,3 @@ | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -299,3 +300,3 @@ cwd: 'test', | ||
it('should work for a match at the last character in the target', function(done){ | ||
var stream = inject.afterEach('</html>\n', '<!-- this is a poor example but should still work -->\n'); | ||
var stream = inject.afterEach('</html>' + os.EOL, '<!-- this is a poor example but should still work -->' + os.EOL); | ||
var expectedFile = fs.readFileSync( path.join(__dirname, './expected/afterEach2.html')); | ||
@@ -317,3 +318,3 @@ | ||
beforeEach(function () { | ||
fakeFile = new gutil.File({ | ||
fakeFile = new Vinyl({ | ||
base: 'test/fixtures', | ||
@@ -368,3 +369,3 @@ cwd: 'test', | ||
it('should fail with a gulp-util.PluginError', function(done){ | ||
it('should fail with a PluginError', function(done){ | ||
var stream = inject._stream(null, { method: 'fail' }); | ||
@@ -371,0 +372,0 @@ |
421
30247
6
25
+ Addedplugin-error@^0.1.2
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@1.1.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarr-union@2.1.0(transitive)
+ Addedarray-slice@0.2.3(transitive)
+ Addedextend-shallow@1.1.4(transitive)
+ Addedkind-of@1.1.0(transitive)
+ Addedplugin-error@0.1.2(transitive)
- Removedgulp-util@^3.0.0
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedisarray@0.0.11.0.0(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@1.1.142.3.8(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.311.1.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedthrough2@2.0.5(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedvinyl@0.5.3(transitive)
- Removedxtend@4.0.2(transitive)