Comparing version 0.8.3 to 0.9.0
@@ -39,3 +39,3 @@ (function() { | ||
}, function(error, filenames, metadata) { | ||
var dirName, file, filename, files, filesystem, shouldUnpack, _i, _len; | ||
var dirName, file, filename, filenamesSorted, files, filesystem, missing, ordering, orderingFiles, pathComponent, pathComponents, shouldUnpack, str, total, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m; | ||
if (error) { | ||
@@ -46,4 +46,46 @@ return callback(error); | ||
files = []; | ||
for (_i = 0, _len = filenames.length; _i < _len; _i++) { | ||
filename = filenames[_i]; | ||
if (options.ordering) { | ||
orderingFiles = fs.readFileSync(options.ordering).toString().split('\n').map(function(line) { | ||
if (line.indexOf(':') !== -1) { | ||
line = line.split(':').pop(); | ||
} | ||
line = line.trim(); | ||
if (line[0] === '/') { | ||
line = line.slice(1); | ||
} | ||
return line; | ||
}); | ||
ordering = []; | ||
for (_i = 0, _len = orderingFiles.length; _i < _len; _i++) { | ||
file = orderingFiles[_i]; | ||
pathComponents = file.split(path.sep); | ||
str = src; | ||
for (_j = 0, _len1 = pathComponents.length; _j < _len1; _j++) { | ||
pathComponent = pathComponents[_j]; | ||
str = path.join(str, pathComponent); | ||
ordering.push(str); | ||
} | ||
} | ||
filenamesSorted = []; | ||
missing = 0; | ||
total = filenames.length; | ||
for (_k = 0, _len2 = ordering.length; _k < _len2; _k++) { | ||
file = ordering[_k]; | ||
if (filenamesSorted.indexOf(file) === -1 && filenames.indexOf(file) !== -1) { | ||
filenamesSorted.push(file); | ||
} | ||
} | ||
for (_l = 0, _len3 = filenames.length; _l < _len3; _l++) { | ||
file = filenames[_l]; | ||
if (filenamesSorted.indexOf(file) === -1) { | ||
filenamesSorted.push(file); | ||
missing += 1; | ||
} | ||
} | ||
console.log("Ordering file has " + ((total - missing) / total * 100) + "% coverage."); | ||
} else { | ||
filenamesSorted = filenames; | ||
} | ||
for (_m = 0, _len4 = filenamesSorted.length; _m < _len4; _m++) { | ||
filename = filenamesSorted[_m]; | ||
file = metadata[filename]; | ||
@@ -50,0 +92,0 @@ switch (file.type) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Creating atom-shell app packages", | ||
"version": "0.8.3", | ||
"version": "0.9.0", | ||
"bin": { | ||
@@ -41,3 +41,3 @@ "asar": "bin/asar" | ||
"grunt": "~0.4.1", | ||
"grunt-coffeelint": "0.0.6", | ||
"grunt-coffeelint": "git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe", | ||
"grunt-contrib-coffee": "~0.6.6", | ||
@@ -44,0 +44,0 @@ "grunt-cli": "~0.1.7", |
Sorry, the diff of this file is not supported yet
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
42438
41
761