gulp-inject
Advanced tools
Comparing version 4.3.0 to 4.3.1
{ | ||
"name": "gulp-inject", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "A javascript, stylesheet and webcomponent injection plugin for Gulp, i.e. inject file references into your index.html", | ||
@@ -29,10 +29,13 @@ "keywords": [ | ||
"test": "mocha -R spec src/**/*_test.js", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"semantic-release": "semantic-release", | ||
"commitmsg": "commitlint -e" | ||
}, | ||
"dependencies": { | ||
"ansi-colors": "^1.0.1", | ||
"arrify": "^1.0.1", | ||
"escape-string-regexp": "^1.0.5", | ||
"event-stream": "^3.1.0", | ||
"fancy-log": "^1.3.2", | ||
"group-array": "^0.3.0", | ||
"gulp-util": "^3.0.0", | ||
"plugin-error": "^0.1.2", | ||
"stream-to-array": "^2.3.0", | ||
@@ -42,7 +45,11 @@ "through2": "^2.0.1" | ||
"devDependencies": { | ||
"@commitlint/cli": "^3.2.0", | ||
"@commitlint/config-angular": "^3.1.1", | ||
"husky": "^0.14.3", | ||
"mocha": "~2.0.1", | ||
"semantic-release": "^12.4.1", | ||
"should": "^4.0.4", | ||
"strip-color": "^0.1.0", | ||
"xo": "^0.13.0", | ||
"semantic-release": "^7.0.2" | ||
"vinyl": "^2.1.0", | ||
"xo": "^0.13.0" | ||
}, | ||
@@ -65,2 +72,2 @@ "engines": { | ||
} | ||
} | ||
} |
# gulp-inject | ||
--- | ||
## HELP WANTED | ||
### Contributors are welcomed! | ||
**I don't have enough time to maintain this plugin as I would want to, so I'm looking for people who want to help out and be contributors/repository admins.** | ||
#### Interested? | ||
**Contact me! See `package.json` for contact information.** | ||
--- | ||
[![NPM version][npm-image]][npm-url] [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Build Status][travis-image]][travis-url] [![XO code style][codestyle-image]][codestyle-url] [![Dependency Status][depstat-image]][depstat-url] | ||
@@ -857,2 +871,10 @@ | ||
#### options.quiet | ||
Type: `Boolean` | ||
Default: `false` | ||
Lower the verbosity by setting this to true, suppressing the logging of successful injections. | ||
#### ~~options.templateString~~ | ||
@@ -859,0 +881,0 @@ |
'use strict'; | ||
var through2 = require('through2'); | ||
var gutil = require('gulp-util'); | ||
var fancyLog = require('fancy-log'); | ||
var PluginError = require('plugin-error'); | ||
var colors = require('ansi-colors'); | ||
var streamToArray = require('stream-to-array'); | ||
@@ -12,5 +14,4 @@ var escapeStringRegexp = require('escape-string-regexp'); | ||
var PluginError = gutil.PluginError; | ||
var magenta = gutil.colors.magenta; | ||
var cyan = gutil.colors.cyan; | ||
var magenta = colors.magenta; | ||
var cyan = colors.cyan; | ||
var noop = function noop() {}; | ||
@@ -288,3 +289,3 @@ | ||
function log(message) { | ||
gutil.log(magenta(PLUGIN_NAME), message); | ||
fancyLog.info(magenta(PLUGIN_NAME), message); | ||
} | ||
@@ -291,0 +292,0 @@ |
/* eslint-env mocha */ | ||
'use strict'; | ||
var path = require('path'); | ||
var File = require('gulp-util').File; | ||
var Vinyl = require('vinyl'); | ||
require('should'); | ||
@@ -11,3 +11,3 @@ var getFilepath = require('./'); | ||
it('returns the path relative to the source file\'s cwd', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -23,3 +23,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('returns the unixified path relative to the source file\'s cwd', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: 'C:\\a\\folder', | ||
@@ -37,3 +37,3 @@ path: 'C:\\a\\folder\\dir\\file.js', | ||
it('returns the path relative to the target file\'s directory', function () { | ||
var target = new File({ | ||
var target = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -43,3 +43,3 @@ path: path.join(__dirname, 'dir1', 'index.html'), | ||
}); | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -55,3 +55,3 @@ path: path.join(__dirname, 'dir2', 'file.js'), | ||
it('returns the unixified path relative to the source file\'s cwd', function () { | ||
var target = new File({ | ||
var target = new Vinyl({ | ||
cwd: 'C:\\a\\folder', | ||
@@ -61,3 +61,3 @@ path: 'C:\\a\\folder\\dir1\\index.html', | ||
}); | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: 'C:\\a\\folder', | ||
@@ -75,3 +75,3 @@ path: 'C:\\a\\folder\\dir2\\file.js', | ||
it('removes the provided `ignorePath` from the beginning of the path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -87,3 +87,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('removes the provided `ignorePath` even if it both begins and ends in a `/` from the beginning of the path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -99,3 +99,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('removes the provided `ignorePath`s from the beginning of the path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -111,3 +111,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('removes the provided `ignorePath` unixified from the beginning of the path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -123,3 +123,3 @@ path: path.join(__dirname, 'dir', 'deep', 'file.js'), | ||
it('removes the provided `ignorePath` unixified from the beginning of a unixified path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: 'C:\\a\\folder', | ||
@@ -135,3 +135,3 @@ path: 'C:\\a\\folder\\dir\\deep\\file.js', | ||
it('removes the provided `ignorePath` from the beginning of a unixified path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: 'C:\\a\\folder', | ||
@@ -149,3 +149,3 @@ path: 'C:\\a\\folder\\dir\\deep\\file.js', | ||
it('prepends the path with a `/`', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -163,3 +163,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('prepends the prefix and a `/` to the path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -175,3 +175,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('keeps any leading `/` from the prefix', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -189,3 +189,3 @@ path: path.join(__dirname, 'dir', 'file.js'), | ||
it('appends the suffix to the path', function () { | ||
var source = new File({ | ||
var source = new Vinyl({ | ||
cwd: __dirname, | ||
@@ -192,0 +192,0 @@ path: path.join(__dirname, 'dir', 'file.js'), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55249
12
715
977
9
9
+ Addedansi-colors@^1.0.1
+ Addedfancy-log@^1.3.2
+ Addedplugin-error@^0.1.2
+ Addedansi-colors@1.1.0(transitive)
+ Addedansi-cyan@0.1.1(transitive)
+ Addedansi-red@0.1.1(transitive)
+ Addedarr-diff@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-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)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(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)
- Removedisarray@0.0.1(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)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedvinyl@0.5.3(transitive)