filing-cabinet
Advanced tools
Comparing version 4.1.6 to 4.2.0
34
index.js
@@ -35,3 +35,4 @@ 'use strict'; | ||
'.ts': tsLookup, | ||
'.tsx': tsLookup | ||
'.tsx': tsLookup, | ||
'.vue': vueLookup | ||
}; | ||
@@ -393,2 +394,33 @@ | ||
function vueLookup(options) { | ||
const { dependency } = options; | ||
if (!dependency) { | ||
debug('blank dependency given. Returning early.'); | ||
return ''; | ||
} | ||
if (dependency.endsWith('.js') || dependency.endsWith('.jsx')) { | ||
return jsLookup(options); | ||
} | ||
if (dependency.endsWith('.ts') || dependency.endsWith('.tsx')) { | ||
return tsLookup(options); | ||
} | ||
if (dependency.endsWith('.scss') || dependency.endsWith('.sass') || dependency.endsWith('.less')) { | ||
return sassLookup(options); | ||
} | ||
if (dependency.endsWith('.styl')) { | ||
return stylusLookup(options); | ||
} | ||
if (options.tsConfig || options.tsConfigPath) { | ||
return tsLookup(options); | ||
} | ||
return jsLookup(options); | ||
} | ||
function resolveWebpackPath({ dependency, filename, directory, webpackConfig }) { | ||
@@ -395,0 +427,0 @@ if (!webpackResolve) { |
{ | ||
"name": "filing-cabinet", | ||
"version": "4.1.6", | ||
"version": "4.2.0", | ||
"description": "Find files based on partial paths", | ||
@@ -5,0 +5,0 @@ "main": "index.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
23529
446