Comparing version 0.3.0 to 0.3.1
@@ -169,3 +169,3 @@ #!/usr/bin/env node | ||
processFile = function (i, filePath) { | ||
processFile = function (fileIndex, filePath) { | ||
if (program.json) { | ||
@@ -175,6 +175,7 @@ output({ | ||
'file' : filePath, | ||
'fileNumber' : i + 1, | ||
'fileNumber' : fileIndex + 1, | ||
'numberOfFiles' : numberOfFiles | ||
}); | ||
} | ||
var data = fs.readFileSync(filePath, 'utf8'), | ||
@@ -184,12 +185,13 @@ matches = domtosource.find(data, program.selector, true), | ||
matchesDetails = [], | ||
matchI, | ||
i, | ||
duration; | ||
if (matchesLen > 0) { | ||
numberOfFilesWithMatches += 1; | ||
totalMatches += matchesLen; | ||
for (matchI = 0; matchI < matchesLen; matchI += 1) { | ||
for (i = 0; i < matchesLen; i += 1) { | ||
matchesDetails.push({ | ||
'html' : trimLines(matches[matchI].html, 2), | ||
'line' : matches[matchI].line, | ||
'column' : matches[matchI].column | ||
'html' : trimLines(matches[i].html, 2), | ||
'line' : matches[i].line, | ||
'column' : matches[i].column | ||
}); | ||
@@ -205,3 +207,4 @@ } | ||
} | ||
if (i === numberOfFiles - 1) { | ||
if (fileIndex === numberOfFiles - 1) { | ||
duration = (Date.now() - startTime) / 1000; | ||
@@ -208,0 +211,0 @@ output({ |
{ | ||
"name" : "elfinder", | ||
"version" : "0.3.0", | ||
"version" : "0.3.1", | ||
"description" : "Command line app for searching in HTML files for elements that match a CSS selector", | ||
@@ -23,3 +23,3 @@ "keywords": ["html", "css", "find in files", "cli", "search", "find"], | ||
"engines": { | ||
"node": "~0.8.x" | ||
"node": ">= 0.8.x" | ||
}, | ||
@@ -30,9 +30,9 @@ "scripts": { | ||
"dependencies" : { | ||
"domtosource" : "0.0.x", | ||
"commander" : "0.6.x" | ||
"domtosource" : "0.1.x", | ||
"commander" : "2.1.x" | ||
}, | ||
"devDependencies": { | ||
"cli-easy": "0.1.x", | ||
"vows": "0.6.x" | ||
"vows": "0.7.x" | ||
} | ||
} |
@@ -38,1 +38,6 @@ # Element Finder | ||
Element Finder is a command line tool so it is best to install it globally with npm. | ||
## Sublime Text Package | ||
There is also a Sublime Text package. More info at https://github.com/keeganstreet/sublime-elfinder |
@@ -63,5 +63,5 @@ var CLIeasy = require('cli-easy'), | ||
.arg('-x "largepage" -s "p"') | ||
.expect('should find 473 matches in 1 file', /Found 473 matches in 1 file./) | ||
.expect('should find 333 matches in 1 file', /Found 333 matches in 1 file./) | ||
.undiscuss() | ||
.export(module); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
12
43
0
144445
1
+ AddedCSSselect@0.4.1(transitive)
+ AddedCSSwhat@0.4.7(transitive)
+ Addedcheerio@0.13.1(transitive)
+ Addedcommander@2.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddomhandler@2.2.1(transitive)
+ Addeddomtosource@0.1.0(transitive)
+ Addeddomutils@1.3.01.4.3(transitive)
+ Addedhtmlparser2@3.4.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedreadable-stream@1.1.14(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedunderscore@1.5.2(transitive)
- Removedboolbase@1.0.0(transitive)
- Removedcheerio@0.10.8(transitive)
- Removedcheerio-select@2.1.0(transitive)
- Removedcommander@0.6.1(transitive)
- Removedcss-select@5.1.0(transitive)
- Removedcss-what@6.1.0(transitive)
- Removeddom-serializer@2.0.0(transitive)
- Removeddomelementtype@2.3.0(transitive)
- Removeddomhandler@2.0.35.0.3(transitive)
- Removeddomtosource@0.0.2(transitive)
- Removeddomutils@1.0.13.2.2(transitive)
- Removedentities@4.5.0(transitive)
- Removedhtmlparser2@2.6.0(transitive)
- Removednth-check@2.1.1(transitive)
- Removedunderscore@1.4.4(transitive)
Updatedcommander@2.1.x
Updateddomtosource@0.1.x