diff --git a/package.json b/package.json index 24352de46..a8cb75dc2 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "chai": "^4.3.4", "cldr-core": "37.0.0", "cldr-localenames-full": "37.0.0", - "colors": "^1.1.2", + "chalk": "^4.1.2", "concat-files": "^0.1.1", "d3": "~6.6.0", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", @@ -132,4 +132,4 @@ "browserslist": [ "> 0.2%, last 6 major versions, Firefox ESR, IE 11, maintained node versions" ] -} +} \ No newline at end of file diff --git a/scripts/build_css.js b/scripts/build_css.js index cd34c357f..1dc7663a1 100644 --- a/scripts/build_css.js +++ b/scripts/build_css.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const colors = require('colors/safe'); +const chalk = require('chalk'); const concat = require('concat-files'); const glob = require('glob'); const fs = require('fs'); @@ -20,8 +20,8 @@ if (process.argv[1].indexOf('build_css.js') > -1) { function buildCSS() { if (_currBuild) return _currBuild; - const START = '🏗 ' + colors.yellow('Building css...'); - const END = '👍 ' + colors.green('css built'); + const START = '🏗 ' + chalk.yellow('Building css...'); + const END = '👍 ' + chalk.green('css built'); console.log(''); console.log(START); diff --git a/scripts/build_data.js b/scripts/build_data.js index cebdb3552..7f0ffd285 100644 --- a/scripts/build_data.js +++ b/scripts/build_data.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const colors = require('colors/safe'); +const chalk = require('chalk'); const fs = require('fs'); const prettyStringify = require('json-stringify-pretty-compact'); const shell = require('shelljs'); @@ -29,8 +29,8 @@ if (process.argv[1].indexOf('build_data.js') > -1) { function buildData() { if (_currBuild) return _currBuild; - const START = '🏗 ' + colors.yellow('Building data...'); - const END = '👍 ' + colors.green('data built'); + const START = '🏗 ' + chalk.yellow('Building data...'); + const END = '👍 ' + chalk.green('data built'); console.log(''); console.log(START); diff --git a/scripts/server.js b/scripts/server.js index cddc45791..170a7ffa7 100644 --- a/scripts/server.js +++ b/scripts/server.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const colors = require('colors/safe'); +const chalk = require('chalk'); const gaze = require('gaze'); const StaticServer = require('static-server'); @@ -12,5 +12,5 @@ gaze(['css/**/*.css'], (err, watcher) => { const server = new StaticServer({ rootPath: process.cwd(), port: 8080, followSymlink: true }); server.start(() => { - console.log(colors.yellow(`Listening on ${server.port}`)); + console.log(chalk.yellow(`Listening on ${server.port}`)); }); diff --git a/scripts/update_locales.js b/scripts/update_locales.js index 43e8d9940..4c8839de8 100644 --- a/scripts/update_locales.js +++ b/scripts/update_locales.js @@ -1,10 +1,10 @@ /* eslint-disable no-console */ /* Downloads the latest translations from Transifex */ +const chalk = require('chalk'); const fs = require('fs'); const fetch = require('node-fetch'); const btoa = require('btoa'); const YAML = require('js-yaml'); -const colors = require('colors/safe'); const resourceIds = ['core', 'imagery', 'community']; const reviewedOnlyLangs = ['vi']; @@ -331,7 +331,7 @@ function checkForDuplicateShortcuts(code, coreStrings) { let shortcut = modifier + rep; if (usedShortcuts[shortcut] && usedShortcuts[shortcut] !== shortcutPathString) { let message = code + ': duplicate shortcut "' + shortcut + '" for "' + usedShortcuts[shortcut] + '" and "' + shortcutPathString + '"'; - console.warn(colors.yellow(message)); + console.warn(chalk.yellow(message)); } else { usedShortcuts[shortcut] = shortcutPathString; }