gulp-include
Advanced tools
Comparing version 0.2.2 to 0.2.3
25
index.js
@@ -6,3 +6,4 @@ var fs = require("fs"), | ||
DIRECTIVE_REGEX = /^(.*=\s*(require|include|require_tree|include_tree)\s+([\w\.\/-]+))$/gm | ||
DIRECTIVE_REGEX = /^(.*=\s*(require|include|require_tree|include_tree)\s+([\w\.\/-]+))$/gm; | ||
IS_HIDDEN_REGEX = /(^|.\/)\.+[^\/\.]/g; | ||
@@ -15,8 +16,10 @@ function getFiles(dir, cb){ | ||
var name = dir+'/'+files[i]; | ||
if (fs.statSync(name).isDirectory()){ | ||
getFiles(name, cb); | ||
}else{ | ||
cb(name); | ||
} | ||
var isHidden = IS_HIDDEN_REGEX.test(name); | ||
if (!isHidden) { | ||
if (fs.statSync(name).isDirectory()){ | ||
getFiles(name, cb); | ||
} else { | ||
cb(name); | ||
} | ||
} | ||
} | ||
@@ -60,4 +63,4 @@ } | ||
var match = matches[1], | ||
relPath = file.base, | ||
fullPath = relPath + matches[3].replace(/['"]/g, ''), | ||
relPath = path.dirname( file.path ), | ||
fullPath = path.join(relPath, matches[3].replace(/['"]/g, '')), | ||
absolutePath = path.resolve(fullPath); | ||
@@ -96,4 +99,4 @@ | ||
var match = matches[1], | ||
relPath = file.base, | ||
fullPath = relPath + matches[3].replace(/['"]/g, ''), | ||
relPath = path.dirname( file.path ), | ||
fullPath = path.join(relPath, matches[3].replace(/['"]/g, '')), | ||
extension = matches[3].split('.').pop(); | ||
@@ -100,0 +103,0 @@ |
{ | ||
"name": "gulp-include", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Makes inclusion of files a breeze. Enables functionality similar to that of snockets / sprockets or other file insertion compilation tools.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/wiledal/gulp-include", |
@@ -7,5 +7,3 @@ #gulp-include [![NPM version][npm-image]][npm-url] ![Travis build][travis-image] | ||
By [wiledal](https://github.com/wiledal) with help from [juanghurtado](https://github.com/juanghurtado) | ||
## Usage | ||
@@ -82,2 +80,5 @@ First, install `gulp-include` as a dev dependency: | ||
## Release log | ||
#### 0.2.3 | ||
* Merged community fixes by [platdesign](https://github.com/platdesign) and [cujojp](https://github.com/cujojp) | ||
#### 0.2.2 | ||
@@ -84,0 +85,0 @@ * Updated regex directive to not collide with other requireing plugins, like browserify ([cwacek](https://github.com/cwacek)) |
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
13990
306
122