gulp-file-include
Advanced tools
Comparing version 0.13.6 to 0.13.7
@@ -0,0 +0,0 @@ module.exports = function(src, index, dest) { |
@@ -91,3 +91,3 @@ 'use strict'; | ||
// jshint ignore: end | ||
return condition ? inst.body : ''; | ||
@@ -97,5 +97,5 @@ } | ||
function includeHandler(inst) { | ||
var args = /[^)"\']*["\']([^"\']*)["\'](,\s*({[\s\S]*?})){0,1}\s*/.exec(inst.args); | ||
var args = /[^)"\']*["\']([^"\']*)["\'](,\s*({[\s\S]*})){0,1}\s*/.exec(inst.args); | ||
if(args) { | ||
if (args) { | ||
var includePath = path.resolve(filebase, args[1]); | ||
@@ -102,0 +102,0 @@ // for checking if we are not including the current file again |
var balanced = require('balanced-match'); | ||
module.exports = function (content, opts) { | ||
module.exports = function(content, opts) { | ||
var result = ''; | ||
@@ -14,3 +14,3 @@ var reStart = new RegExp(opts.prefix + '[ ]*' + opts.name + '\\('); | ||
while(matchStart = reStart.exec(content)) { | ||
while (matchStart = reStart.exec(content)) { | ||
safeStart = matchStart.index + matchStart[0].length - 1; | ||
@@ -20,4 +20,4 @@ | ||
if(matchArg && matchArg.start === 0) { | ||
if(opts.suffix) { | ||
if (matchArg && matchArg.start === 0) { | ||
if (opts.suffix) { | ||
matchEnd = reEnd.exec(matchArg.post); | ||
@@ -28,3 +28,3 @@ } | ||
if(!opts.suffix || matchEnd) { | ||
if (!opts.suffix || matchEnd) { | ||
before = content.slice(0, matchStart.index); | ||
@@ -36,3 +36,3 @@ replacement = opts.handler({ | ||
if(replacement !== undefined) { | ||
if (replacement !== undefined) { | ||
result += before + replacement.toString(); | ||
@@ -39,0 +39,0 @@ content = content.slice(safeStart + matchArg.end + 1 + matchEnd); |
@@ -30,3 +30,3 @@ var balanced = require('balanced-match'); | ||
if(replacement !== undefined) { | ||
if (replacement !== undefined) { | ||
result += before + parse(replacement.toString(), opts); | ||
@@ -33,0 +33,0 @@ content = content.slice(startEnd + matchBody.end + matchEnd); |
@@ -0,0 +0,0 @@ var flatten = require('flatnest').flatten; |
{ | ||
"name": "gulp-file-include", | ||
"version": "0.13.6", | ||
"version": "0.13.7", | ||
"description": "a gulp plugin for file include", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -0,0 +0,0 @@ [![NPM version][npm-img]][npm-url] |
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
12944