Codacy update for scripts

This commit is contained in:
Angelos Chalaris
2018-09-15 14:27:30 +03:00
parent d47508a3a4
commit c48b2487c1
4 changed files with 4 additions and 10 deletions

View File

@ -63,7 +63,7 @@ if (
data.slice(data.lastIndexOf('```js'), data.lastIndexOf('```')) + data.slice(data.lastIndexOf('```js'), data.lastIndexOf('```')) +
data.slice(data.lastIndexOf('```')) data.slice(data.lastIndexOf('```'))
); );
output += `${data}\n<br>${misc.link('⬆ Back to top', misc.anchor('Table of Contents'))}\n\n` output += `${data}\n<br>${misc.link('⬆ Back to top', misc.anchor('Table of Contents'))}\n\n`;
} }
// Write to the README file of the archive // Write to the README file of the archive

View File

@ -16,7 +16,7 @@ if (!fs.existsSync(DIST)) fs.mkdirSync(DIST);
const es5 = babel({ presets: [['env', { modules: false }]] }); const es5 = babel({ presets: [['env', { modules: false }]] });
const min = minify({ comments: false }); const min = minify({ comments: false });
// Create the bundles // Create the bundles
(async () => { (async() => {
const bundle = await rollup({ input: INPUT_FILE }); const bundle = await rollup({ input: INPUT_FILE });
const bundleES5 = await rollup({ input: INPUT_FILE, plugins: [es5] }); const bundleES5 = await rollup({ input: INPUT_FILE, plugins: [es5] });
const bundleMin = await rollup({ input: INPUT_FILE, plugins: [min] }); const bundleMin = await rollup({ input: INPUT_FILE, plugins: [min] });

View File

@ -94,7 +94,7 @@ snippetFiles
}); });
try { try {
fs.writeFileSync(path.join(TEST_PATH, 'testlog'), `Test log for: ${new Date().toString()}\n`); fs.writeFileSync(path.join(TEST_PATH, 'testlog'), `Test log for: ${new Date().toString()}\n`);
childProcess.execSync(`npm test`); childProcess.execSync('npm test');
} catch (e) { } catch (e) {
fs.appendFileSync(path.join(TEST_PATH, 'testlog')); fs.appendFileSync(path.join(TEST_PATH, 'testlog'));
} }

View File

@ -87,12 +87,6 @@ try {
startPart = fs.readFileSync(path.join(staticPartsPath, 'page-start.html'), 'utf8'); startPart = fs.readFileSync(path.join(staticPartsPath, 'page-start.html'), 'utf8');
endPart = fs.readFileSync(path.join(staticPartsPath, 'page-end.html'), 'utf8'); endPart = fs.readFileSync(path.join(staticPartsPath, 'page-end.html'), 'utf8');
beginnerStartPart = fs.readFileSync(
path.join(staticPartsPath, 'beginner-page-start.html'),
'utf8'
);
beginnerEndPart = fs.readFileSync(path.join(staticPartsPath, 'beginner-page-end.html'), 'utf8');
archivedStartPart = fs.readFileSync( archivedStartPart = fs.readFileSync(
path.join(staticPartsPath, 'archived-page-start.html'), path.join(staticPartsPath, 'archived-page-start.html'),
'utf8' 'utf8'
@ -395,7 +389,7 @@ try {
process.exit(1); process.exit(1);
} }
// Copy static files // Copy static files
staticFiles.forEach(f => { staticFiles.forEach(f => {
try { try {
fs.copyFileSync(path.join(staticPartsPath, f), path.join(docsPath, f)); fs.copyFileSync(path.join(staticPartsPath, f), path.join(docsPath, f));