filing-cabinet
Advanced tools
Comparing version 1.8.0 to 1.9.0
19
index.js
@@ -10,2 +10,3 @@ var path = require('path'); | ||
var sassLookup = require('sass-lookup'); | ||
var ts = require('typescript'); | ||
@@ -21,2 +22,3 @@ var resolveDependencyPath = require('resolve-dependency-path'); | ||
'.jsx': jsLookup, | ||
'.ts': tsLookup, | ||
'.scss': sassLookup, | ||
@@ -148,2 +150,19 @@ '.sass': sassLookup, | ||
function tsLookup(partial, filename, directory) { | ||
debug('performing a typescript lookup'); | ||
var options = { | ||
module: ts.ModuleKind.AMD | ||
}; | ||
var host = ts.createCompilerHost({}); | ||
debug('with options: ', options); | ||
var resolvedModule = ts.resolveModuleName(partial, filename, options, host).resolvedModule; | ||
debug('ts resolved module: ', resolvedModule); | ||
var result = resolvedModule ? resolvedModule.resolvedFileName : ''; | ||
debug('result: ' + result); | ||
return result ? path.resolve(result) : ''; | ||
} | ||
/** | ||
@@ -150,0 +169,0 @@ * TODO: Export to a separate module |
{ | ||
"name": "filing-cabinet", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "Find files based on partial paths", | ||
@@ -44,5 +44,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"app-module-path": "~1.1.0", | ||
"commander": "~2.8.1", | ||
"debug": "~2.2.0", | ||
"app-module-path": "^1.1.0", | ||
"commander": "^2.8.1", | ||
"debug": "^2.2.0", | ||
"enhanced-resolve": "~3.0.3", | ||
@@ -52,8 +52,9 @@ "is-relative-path": "^1.0.1", | ||
"module-lookup-amd": "^4.0.2", | ||
"object-assign": "~4.0.1", | ||
"resolve": "~1.1.7", | ||
"resolve-dependency-path": "~1.0.2", | ||
"sass-lookup": "^1.0.2", | ||
"stylus-lookup": "^1.0.1" | ||
"object-assign": "^4.0.1", | ||
"resolve": "^1.1.7", | ||
"resolve-dependency-path": "^1.0.2", | ||
"sass-lookup": "^1.1.0", | ||
"stylus-lookup": "^1.0.1", | ||
"typescript": "^2.4.2" | ||
} | ||
} |
@@ -39,3 +39,4 @@ ### filing-cabinet [![npm](http://img.shields.io/npm/v/filing-cabinet.svg)](https://npmjs.org/package/filing-cabinet) [![npm](http://img.shields.io/npm/dm/filing-cabinet.svg)](https://npmjs.org/package/filing-cabinet) | ||
* JavaScript (all files with the `.js` extension) | ||
* JavaScript: CommonJS, AMD, ES6 | ||
* TypeScript | ||
* CSS Preprocessors: Sass (`.scss` and `.sass`), Stylus (`.styl`), and Less (`.less`) | ||
@@ -42,0 +43,0 @@ |
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
12196
252
68
13
+ Addedtypescript@^2.4.2
+ Addedcommander@2.20.3(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedms@2.0.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtypescript@2.9.2(transitive)
- Removeddebug@2.2.0(transitive)
- Removedms@0.7.1(transitive)
- Removedobject-assign@4.0.1(transitive)
- Removedresolve@1.1.7(transitive)
Updatedapp-module-path@^1.1.0
Updatedcommander@^2.8.1
Updateddebug@^2.2.0
Updatedobject-assign@^4.0.1
Updatedresolve@^1.1.7
Updatedsass-lookup@^1.1.0