Comparing version 0.0.109 to 0.0.110
#!/usr/bin/env node | ||
var fs = require('fs'); | ||
var program = require('commander'); | ||
var eml = require('eml'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const program = require('commander'); | ||
const glob = require('glob'); | ||
const eml = require('eml'); | ||
@@ -10,8 +12,15 @@ program | ||
.option('-i, --input <file ...>', 'Input EML file') | ||
.option('-o, --output <file ...>', 'Output HTML file') | ||
.option('-o, --output [file ...]', 'Output HTML file') | ||
.parse(process.argv); | ||
const emlFile = fs.readFileSync(program.input, 'utf8'); | ||
const html = eml(emlFile); | ||
glob(program.input, null, function(err, paths) { | ||
paths.forEach(function(filePath) { | ||
const extension = path.extname(filePath); | ||
const dirname = path.dirname(filePath); | ||
const basename = path.basename(filePath, extension); | ||
const emlFile = fs.readFileSync(filePath, 'utf8'); | ||
const html = eml(emlFile); | ||
fs.writeFileSync(program.output, html, 'utf8'); | ||
fs.writeFileSync(dirname + '/' + basename + '.html', html, 'utf8'); | ||
}); | ||
}); |
{ | ||
"name": "eml-cli", | ||
"version": "0.0.109", | ||
"version": "0.0.110", | ||
"author": "Vlad Trushin", | ||
@@ -17,4 +17,5 @@ "description": "EML core", | ||
"commander": "^2.14.1", | ||
"eml": "0.0.110" | ||
"eml": "0.0.110", | ||
"glob": "^7.1.2" | ||
} | ||
} |
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
1223
21
3
+ Addedglob@^7.1.2
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedwrappy@1.0.2(transitive)