Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor refactor

  • Loading branch information...
commit 7248801528d1589859477689a535000fb58a21e0 1 parent 9e8c8f6
@andrewrk authored
Showing with 11 additions and 13 deletions.
  1. +6 −9 jspackage.js
  2. +5 −4 src/jspackage.coffee
View
15 jspackage.js
@@ -32,7 +32,7 @@ parseFile = function(resolved_dep, cb) {
}
file.mtime = +stat.mtime;
return fs.readFile(resolved_dep.path, 'utf8', function(err, source) {
- var depend, options, parser, re, result, seen, timestamp;
+ var parser, re, result, timestamp;
if (err) {
cb(err);
return;
@@ -51,16 +51,13 @@ parseFile = function(resolved_dep, cb) {
re = parser.depend_re;
re.lastIndex = 0;
while (result = re.exec(source)) {
- depend = result[1];
- options = {
- bare: result[2] != null
- };
- seen = resolved_dep.seen.concat(file.path);
file.deps.push({
- depend: depend,
- options: options,
+ depend: result[1],
+ options: {
+ bare: result[2] != null
+ },
cwd: file.cwd,
- seen: seen
+ seen: resolved_dep.seen.concat(file.path)
});
}
return cb(null, file);
View
9 src/jspackage.coffee
@@ -39,10 +39,11 @@ parseFile = (resolved_dep, cb) ->
re = parser.depend_re
re.lastIndex = 0
while result = re.exec(source)
- depend = result[1]
- options = {bare: result[2]?}
- seen = resolved_dep.seen.concat(file.path)
- file.deps.push {depend, options, cwd: file.cwd, seen}
+ file.deps.push
+ depend: result[1]
+ options: {bare: result[2]?}
+ cwd: file.cwd
+ seen: resolved_dep.seen.concat(file.path)
cb null, file
Please sign in to comment.
Something went wrong with that request. Please try again.