Skip to content

Commit

Permalink
Use new node-module-lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjoelkemp committed Jul 4, 2015
1 parent f679ca7 commit 5164d49
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_js:

notifications:
email: false

sudo: false
3 changes: 2 additions & 1 deletion bin/approot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ var getAppRoots = require('../');
var directory = process.argv[2];

if (!directory) {
throw new Error('please supply a directory');
console.log('Please supply a directory');
process.exit(1);
}

getAppRoots({
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function getIndependentFiles(files, options) {

deps.forEach(function(dep) {
if (file.type === 'amd' && options.config) {
dep = lookup(options.config, dep);
dep = lookup(options.config, dep, file.path);
}

dep = resolveDep(dep, file.path, options.directory);
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
},
"homepage": "https://github.com/mrjoelkemp/node-app-root",
"dependencies": {
"module-definition": "~2.1.0",
"module-lookup-amd": "~1.0.0",
"module-definition": "^2.1.0",
"module-lookup-amd": "^2.0.0",
"node-dir": "~0.1.6",
"precinct": "~2.3.1",
"q": "~1.0.1",
"resolve-dependency-path": "~1.0.1"
"precinct": "^2.3.1",
"q": "^1.0.1",
"resolve-dependency-path": "^1.0.1"
},
"devDependencies": {
"jscs": "~1.8.0",
Expand Down
1 change: 1 addition & 0 deletions test/aliased/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require.config({
"baseUrl": "js",
"paths": {
"bar": "./b",
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe('app-root', function() {

it('handles aliased modules with a supplied config', function(done) {
var opts = {
directory: __dirname + '/aliased',
directory: __dirname + '/aliased/js',
config: __dirname + '/aliased/config.json',
success: function(root) {
assert(root.length === 1);
Expand Down

0 comments on commit 5164d49

Please sign in to comment.