Duplication and unnecessary dependency cleanup

This commit is contained in:
Angelos Chalaris
2018-09-15 15:03:39 +03:00
parent a90e7b58f9
commit a0b294bfdf
6 changed files with 12 additions and 19 deletions

View File

@ -7,7 +7,6 @@ const fs = require('fs-extra');
const path = require('path');
const chalk = require('chalk');
const prism = require('prismjs');
const util = require('./util');
let snippetsData = require('../snippet_data/snippets.json');
let snippetsArchiveData = require('../snippet_data/snippetsArchive.json');
// Paths

View File

@ -6,7 +6,6 @@
// Load modules
const fs = require('fs-extra');
const path = require('path');
const chalk = require('chalk');
const util = require('./util');
const LOCALE_PATH = 'locale';

View File

@ -4,7 +4,6 @@
*/
// Load modules
const fs = require('fs-extra'),
path = require('path'),
chalk = require('chalk');
const util = require('./util');
if (util.isTravisCI() && /^Travis build: \d+/g.test(process.env['TRAVIS_COMMIT_MESSAGE'])) {
@ -19,9 +18,6 @@ let snippets = {},
tagDbData = {},
missingTags = 0,
tagDbStats = {};
// Load helper functions (these are from existing snippets in 30 seconds of code!)
const objectFromPairs = arr => arr.reduce((a, v) => ((a[v[0]] = v[1]), a), {});
const countOccurrences = (arr, value) => arr.reduce((a, v) => (v === value ? a + 1 : a + 0), 0);
// Start the timer of the script
console.time('Tagger');
// Synchronously read all snippets and sort them as necessary (case-insensitive)

View File

@ -4,7 +4,6 @@
*/
// Load modules
const fs = require('fs-extra'),
https = require('https'),
path = require('path'),
chalk = require('chalk'),
md = require('markdown-it')(),