fis3-hook-node_modules
Advanced tools
Comparing version 2.0.9 to 2.0.10
@@ -9,3 +9,3 @@ var path = require('path'); | ||
if (/^([^\/]+)(?:\/(.*))?$/.test(id)) { | ||
if (/^([^\/\{\}]+)(?:\/(.*))?$/.test(id)) { | ||
var prefix = RegExp.$1; | ||
@@ -21,2 +21,3 @@ var subpath = RegExp.$2; | ||
if (!pkg) { | ||
opts.shutup || fis.log.warn('Can\'t resolve `%s` in file [%s], did you miss `npm install %s`', prefix, file.subpath, prefix); | ||
return info; | ||
@@ -23,0 +24,0 @@ } |
@@ -41,5 +41,11 @@ var fs = require('fs'); | ||
var hostJsonPath = path.join(currentDir, '../package.json'); | ||
var hostJson = {}; | ||
if (fis.util.exists(hostJsonPath)) { | ||
hostJson = fis.util.readJSON(hostJsonPath); | ||
} | ||
list = cachePkgs[currentDir] = {}; | ||
fs.readdirSync(currentDir).forEach(function(folderName) { | ||
if (folderName[0] === '.') { | ||
if (folderName[0] === '.' || hostJson.devDependencies && hostJson.devDependencies[folderName]) { | ||
return null; | ||
@@ -46,0 +52,0 @@ } |
{ | ||
"name": "fis3-hook-node_modules", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"description": "fis3 npm support", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
16258
327