Skip to content

Commit

Permalink
Switch to picocolors (#4825)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomap authored Nov 24, 2021
1 parent 3ed6fd9 commit 11b145c
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/box/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Promise = require('bluebird');
const File = require('./file');
const { Pattern, createSha1Hash } = require('hexo-util');
const { createReadStream, readdir, stat, watch } = require('hexo-fs');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');
const { EventEmitter } = require('events');
const { isMatch, makeRe } = require('micromatch');

Expand Down
2 changes: 1 addition & 1 deletion lib/extend/tag.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const { stripIndent } = require('hexo-util');
const { cyan, magenta, red, bold } = require('nanocolors');
const { cyan, magenta, red, bold } = require('picocolors');
const { Environment } = require('nunjucks');
const Promise = require('bluebird');
const rSwigRawFullBlock = /{% *raw *%}/;
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Promise = require('bluebird');
const { sep, join, dirname } = require('path');
const tildify = require('tildify');
const Database = require('warehouse');
const { magenta, underline } = require('nanocolors');
const { magenta, underline } = require('picocolors');
const { EventEmitter } = require('events');
const { readFile } = require('hexo-fs');
const Module = require('module');
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/load_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const tildify = require('tildify');
const Theme = require('../theme');
const Source = require('./source');
const { exists, readdir } = require('hexo-fs');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');
const { deepMerge } = require('hexo-util');
const validateConfig = require('./validate_config');
const { external_link: externalLinkDefaultCfg } = require('./default_config');
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/load_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const { join } = require('path');
const { exists, readFile, listDir } = require('hexo-fs');
const Promise = require('bluebird');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');

module.exports = ctx => {
if (!ctx.env.init || ctx.env.safe) return;
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/load_theme_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const { join, parse } = require('path');
const tildify = require('tildify');
const { exists, readdir } = require('hexo-fs');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');
const { deepMerge } = require('hexo-util');

module.exports = ctx => {
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const assert = require('assert');
const moment = require('moment');
const Promise = require('bluebird');
const { join, extname, basename } = require('path');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');
const { load } = require('js-yaml');
const { slugize, escapeRegExp } = require('hexo-util');
const { copyDir, exists, listDir, mkdirs, readFile, rmdir, unlink, writeFile } = require('hexo-fs');
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/deploy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const { exists } = require('hexo-fs');
const { underline, magenta } = require('nanocolors');
const { underline, magenta } = require('picocolors');

function deployConsole(args) {
let config = this.config.deploy;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { exists, writeFile, unlink, stat, mkdirs } = require('hexo-fs');
const { join } = require('path');
const Promise = require('bluebird');
const prettyHrtime = require('pretty-hrtime');
const { cyan, magenta } = require('nanocolors');
const { cyan, magenta } = require('picocolors');
const tildify = require('tildify');
const { PassThrough } = require('stream');
const { createSha1Hash } = require('hexo-util');
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/list/category.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { underline } = require('nanocolors');
const { underline } = require('picocolors');
const table = require('text-table');
const { stringLength } = require('./common');

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/list/page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { magenta, underline, gray } = require('nanocolors');
const { magenta, underline, gray } = require('picocolors');
const table = require('text-table');
const { stringLength } = require('./common');

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/list/post.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { gray, magenta, underline } = require('nanocolors');
const { gray, magenta, underline } = require('picocolors');
const table = require('text-table');
const { stringLength } = require('./common');

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/list/tag.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { magenta, underline } = require('nanocolors');
const { magenta, underline } = require('picocolors');
const table = require('text-table');
const { stringLength } = require('./common');

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/migrate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { underline, magenta } = require('nanocolors');
const { underline, magenta } = require('picocolors');

function migrateConsole(args) {
// Display help message if user didn't input any arguments
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/new.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const tildify = require('tildify');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');

const reservedKeys = {
_: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/publish.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const tildify = require('tildify');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');

function publishConsole(args) {
// Display help message if user didn't input any arguments
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { resolve } = require('path');
const tildify = require('tildify');
const prettyHrtime = require('pretty-hrtime');
const fs = require('hexo-fs');
const { cyan, magenta } = require('nanocolors');
const { cyan, magenta } = require('picocolors');

function renderConsole(args) {
// Display help message if user didn't input any arguments
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/generator/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fs = require('hexo-fs');
const Promise = require('bluebird');
const { extname } = require('path');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');

const process = (name, ctx) => {
return Promise.filter(ctx.model(name).toArray(), asset => fs.exists(asset.source).tap(exist => {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/processor/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Promise = require('bluebird');
const { parse: yfm } = require('hexo-front-matter');
const { extname, relative } = require('path');
const { Pattern } = require('hexo-util');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');

module.exports = ctx => {
return {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/processor/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { parse: yfm } = require('hexo-front-matter');
const { extname, join } = require('path');
const { stat, listDir } = require('hexo-fs');
const { slugize, Pattern, Permalink } = require('hexo-util');
const { magenta } = require('nanocolors');
const { magenta } = require('picocolors');

const postDir = '_posts/';
const draftDir = '_drafts/';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"moize": "^6.1.0",
"moment": "^2.22.2",
"moment-timezone": "^0.5.21",
"nanocolors": "^0.2.12",
"picocolors": "^1.0.0",
"nunjucks": "^3.2.1",
"pretty-hrtime": "^1.0.3",
"resolve": "^1.8.1",
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { spawn: spawnAsync } = require('hexo-util');
const { rmdir, exists } = require('hexo-fs');
const { join, resolve } = require('path');
const log = require('hexo-log')();
const { red } = require('nanocolors');
const { red } = require('picocolors');
const hooks = [
{ regex: /Hexo version/, tag: 'hexo-begin' },
{ regex: /Start processing/, tag: 'processing' },
Expand Down

0 comments on commit 11b145c

Please sign in to comment.