Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-inject-string

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-inject-string - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

index.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc