Skip to content

Commit

Permalink
s/colors/chalk
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Jan 11, 2022
1 parent 4e6d9c6 commit d9c23fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions lib/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
const colors = require('colors/safe');
const chalk = require('chalk');
const fs = require('fs');
const glob = require('glob');
const jsonschema = require('jsonschema');
Expand All @@ -16,8 +16,8 @@ const fetchTranslations = require('./translations.js').fetchTranslations;
let _currBuild = null;

function validateData(options) {
const START = '🔬 ' + colors.yellow('Validating schema...');
const END = '👍 ' + colors.green('schema okay');
const START = '🔬 ' + chalk.yellow('Validating schema...');
const END = '👍 ' + chalk.green('schema okay');

console.log('');
console.log(START);
Expand All @@ -33,8 +33,8 @@ function buildDev(options) {

if (_currBuild) return _currBuild;

const START = '🏗 ' + colors.yellow('Validating and building for development...');
const END = '👍 ' + colors.green('built for development');
const START = '🏗 ' + chalk.yellow('Validating and building for development...');
const END = '👍 ' + chalk.green('built for development');

console.log('');
console.log(START);
Expand All @@ -50,8 +50,8 @@ function buildDist(options) {

if (_currBuild) return _currBuild;

const START = '🏗 ' + colors.yellow('Validating and building dist files...');
const END = '👍 ' + colors.green('dist files built');
const START = '🏗 ' + chalk.yellow('Validating and building dist files...');
const END = '👍 ' + chalk.green('dist files built');

console.log('');
console.log(START);
Expand Down Expand Up @@ -358,7 +358,7 @@ function generatePresets(dataDir, tstrings, searchableFieldIDs, listReusedIcons)
console.log('');
});
} else {
console.log(colors.green('No icon is used more than ' + reuseLimit + ' time(s) across all searchable presets\n'));
console.log(chalk.green('No icon is used more than ' + reuseLimit + ' time(s) across all searchable presets\n'));
}
}

Expand Down Expand Up @@ -441,7 +441,7 @@ function generateTaginfo(presets, fields, deprecated, tstrings, projectInfo) {
const requiredProps = ['name', 'description', 'project_url', 'contact_name', 'contact_email'];
for (let i in requiredProps) {
if (!(requiredProps[i] in projectInfo)) {
console.log(colors.yellow('Cannot compile taginfo.json: missing required project property `' + requiredProps[i] + '`'));
console.log(chalk.yellow('Cannot compile taginfo.json: missing required project property `' + requiredProps[i] + '`'));
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"main": "lib/index.js",
"dependencies": {
"btoa": "^1.2.1",
"colors": "^1.1.2",
"chalk": "^4.1.2",
"glob": "^7.1.0",
"js-yaml": "^4.0.0",
"jsonschema": "^1.1.0",
Expand Down

7 comments on commit d9c23fa

@tyrasd
Copy link
Collaborator

@tyrasd tyrasd commented on d9c23fa Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you see #31, especially #31 (comment)?

@bhousel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I did not. You.. published a version that you didn’t yet check in and push??

@bhousel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see you just pinned it to a working version, yeah that’s fine too but this change gets rid of it completely, as it has no future.

@tyrasd
Copy link
Collaborator

@tyrasd tyrasd commented on d9c23fa Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I did not. You.. published a version that you didn’t yet check in and push??

I would have pushed it if I had write access to the repository.

@tyrasd
Copy link
Collaborator

@tyrasd tyrasd commented on d9c23fa Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should we continue with this one? What about releasing the current main version as 4.0.6 here and on npm, such that we have a consistent state again? I could help you with that, but I don't have access to push into this repository. Let me know if I should prepare a PR.

@bhousel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just gave you admin access to it.
I don't actually know why the project was set up this way instead of just being some build scripts in the id-tagging-schema repo.
(Sorry If you requested this before and I missed it, I was not watching this repo until now).

I was mostly just interested in going through all the projects I could find and removing colors.

@tyrasd
Copy link
Collaborator

@tyrasd tyrasd commented on d9c23fa Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Version 4.0.6 with chalk is out now. ✔️

Please sign in to comment.