Comparing version 1.0.0-pre4 to 1.0.0
@@ -111,3 +111,3 @@ /*jshint maxlen:1000 */ | ||
total++; | ||
if(!el[0] || (el[1].data && el[1].data.length)) { | ||
if(el[0] || (!el[0] && el[1].data && el[1].data.length)) { | ||
err++; | ||
@@ -119,16 +119,13 @@ } else { | ||
var dir = pth.resolve('./yaspeller'), | ||
template = fs.readFileSync('lib/report/template.html').toString(), | ||
var template = fs.readFileSync(pth.join(__dirname, 'template.html')).toString(), | ||
filename = 'yaspeller_report.html', | ||
html = '<div class="total">Processed resources: ' + total + | ||
' (<span class="sym-err">χ</span>' + '– ' + err + '</span>, <span class="sym-ok">✓</span>– ' + ok + ')<br/>' + | ||
'Checking finished: ' + ((+new Date() - startTime) / 1000) + ' sec.' + '</div>' + | ||
' (<span class="sym-err">χ</span>– ' + err + | ||
'</span>, <span class="sym-ok">✓</span>– ' + ok + ')<br/>' + | ||
'Checking finished: ' + ((+new Date() - startTime) / 1000) + ' sec.</div>' + | ||
buffer.join(''); | ||
try { | ||
if(!fs.existsSync(dir)) { | ||
fs.mkdirSync(dir); | ||
} | ||
fs.writeFileSync(pth.join(dir, 'report.html'), template.replace(/\{\{content\}\}/, html)); | ||
console.log(chalk.cyan('HTML report: ./yaspeller/report.html')); | ||
fs.writeFileSync(filename, template.replace(/\{\{content\}\}/, html)); | ||
console.log(chalk.cyan('HTML report: ./' + filename)); | ||
} catch(e) { | ||
@@ -135,0 +132,0 @@ console.error(e); |
var fs = require('fs'), | ||
pth = require('path'), | ||
chalk = require('chalk'); | ||
@@ -7,11 +6,6 @@ | ||
onend: function(data) { | ||
var dir = pth.resolve('./yaspeller'); | ||
var filename = 'yaspeller_report.json'; | ||
try { | ||
if(!fs.existsSync(dir)) { | ||
fs.mkdirSync(dir); | ||
} | ||
fs.writeFileSync(pth.join(dir, 'report.json'), JSON.stringify(data, null, ' ')); | ||
console.log(chalk.cyan('JSON report: ./yaspeller/report.json')); | ||
fs.writeFileSync(filename, JSON.stringify(data, null, ' ')); | ||
console.log(chalk.cyan('JSON report: ./' + filename)); | ||
} catch(e) { | ||
@@ -18,0 +12,0 @@ console.error(e); |
@@ -13,3 +13,3 @@ { | ||
"description": "Search tool typos in the text, files and websites", | ||
"version": "1.0.0pre4", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
@@ -16,0 +16,0 @@ "homepage": "https://github.com/hcodes/yaspeller", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
0
41854
883
0