Skip to content

Commit

Permalink
add spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Mar 7, 2023
1 parent a53739f commit 9d8764c
Show file tree
Hide file tree
Showing 85 changed files with 145 additions and 145 deletions.
2 changes: 1 addition & 1 deletion lib/box/file.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {readFile, readFileSync, stat, statSync} from 'hexo-fs';
import { readFile, readFileSync, stat, statSync } from 'hexo-fs';

class File {
public source: any;
Expand Down
12 changes: 6 additions & 6 deletions lib/box/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {join, sep} from 'path';
import { join, sep } from 'path';
import BlueBirdPromise from 'bluebird';
import File from './file';
import {Pattern, createSha1Hash} from 'hexo-util';
import {createReadStream, readdir, stat, watch} from 'hexo-fs';
import {magenta} from 'picocolors';
import {EventEmitter} from 'events';
import {isMatch, makeRe} from 'micromatch';
import { Pattern, createSha1Hash } from 'hexo-util';
import { createReadStream, readdir, stat, watch } from 'hexo-fs';
import { magenta } from 'picocolors';
import { EventEmitter } from 'events';
import { isMatch, makeRe } from 'micromatch';

const defaultPattern = new Pattern(() => ({}));

Expand Down
2 changes: 1 addition & 1 deletion lib/extend/injector.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Cache} from 'hexo-util';
import { Cache } from 'hexo-util';

class Injector {
public store: any;
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/processor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Promise from 'bluebird';
import {Pattern} from 'hexo-util';
import { Pattern } from 'hexo-util';

class Processor {
public store: any;
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/renderer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {extname} from 'path';
import { extname } from 'path';
import Promise from 'bluebird';

const getExtname = str => {
Expand Down
6 changes: 3 additions & 3 deletions lib/extend/tag.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {stripIndent} from 'hexo-util';
import {cyan, magenta, red, bold} from 'picocolors';
import {Environment} from 'nunjucks';
import { stripIndent } from 'hexo-util';
import { cyan, magenta, red, bold } from 'picocolors';
import { Environment } from 'nunjucks';
import Promise from 'bluebird';
const rSwigRawFullBlock = /{% *raw *%}/;
const rCodeTag = /<code[^<>]*>[\s\S]+?<\/code>/g;
Expand Down
12 changes: 6 additions & 6 deletions lib/hexo/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Promise from 'bluebird';
import {sep, join, dirname} from 'path';
import { sep, join, dirname } from 'path';
import tildify from 'tildify';
import Database from 'warehouse';
import {magenta, underline} from 'picocolors';
import {EventEmitter} from 'events';
import {readFile} from 'hexo-fs';
import { magenta, underline } from 'picocolors';
import { EventEmitter } from 'events';
import { readFile } from 'hexo-fs';
import Module from 'module';
import {runInThisContext} from 'vm';
import { runInThisContext } from 'vm';
const {version} = require('../../package.json');
import logger from 'hexo-log';

Expand Down Expand Up @@ -35,7 +35,7 @@ import Locals from './locals';
import defaultConfig from './default_config';
import loadDatabase from './load_database';
import multiConfigPath from './multi_config_path';
import {deepMerge, full_url_for} from 'hexo-util';
import { deepMerge, full_url_for } from 'hexo-util';
let resolveSync; // = require('resolve');

const libDir = dirname(__dirname);
Expand Down
8 changes: 4 additions & 4 deletions lib/hexo/load_config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {sep, resolve, join, parse} from 'path';
import { sep, resolve, join, parse } from 'path';
import tildify from 'tildify';
import Theme from '../theme';
import Source from './source';
import {exists, readdir} from 'hexo-fs';
import {magenta} from 'picocolors';
import {deepMerge} from 'hexo-util';
import { exists, readdir } from 'hexo-fs';
import { magenta } from 'picocolors';
import { deepMerge } from 'hexo-util';
import validateConfig from './validate_config';

export = async ctx => {
Expand Down
6 changes: 3 additions & 3 deletions lib/hexo/load_plugins.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {join} from 'path';
import {exists, readFile, listDir} from 'hexo-fs';
import { join } from 'path';
import { exists, readFile, listDir } from 'hexo-fs';
import Promise from 'bluebird';
import {magenta} from 'picocolors';
import { magenta } from 'picocolors';

export = ctx => {
if (!ctx.env.init || ctx.env.safe) return;
Expand Down
8 changes: 4 additions & 4 deletions lib/hexo/load_theme_config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {join, parse} from 'path';
import { join, parse } from 'path';
import tildify from 'tildify';
import {exists, readdir} from 'hexo-fs';
import {magenta} from 'picocolors';
import {deepMerge} from 'hexo-util';
import { exists, readdir } from 'hexo-fs';
import { magenta } from 'picocolors';
import { deepMerge } from 'hexo-util';

export = ctx => {
if (!ctx.env.init) return;
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/locals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Cache} from 'hexo-util';
import { Cache } from 'hexo-util';

class Locals {
public cache: any;
Expand Down
4 changes: 2 additions & 2 deletions lib/hexo/multi_config_path.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {isAbsolute, resolve, join, extname} from 'path';
import { isAbsolute, resolve, join, extname } from 'path';
import { existsSync, readFileSync, writeFileSync } from 'hexo-fs';
import yml from 'js-yaml';
import {deepMerge} from 'hexo-util';
import { deepMerge } from 'hexo-util';

export = ctx => function multiConfigPath(base, configPaths, outputDir) {
const { log } = ctx;
Expand Down
12 changes: 6 additions & 6 deletions lib/hexo/post.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import assert from 'assert';
import moment from 'moment';
import Promise from 'bluebird';
import {join, extname, basename} from 'path';
import {magenta} from 'picocolors';
import {load} from 'js-yaml';
import {slugize, escapeRegExp} from 'hexo-util';
import {copyDir, exists, listDir, mkdirs, readFile, rmdir, unlink, writeFile} from 'hexo-fs';
import {parse as yfmParse, split as yfmSplit, stringify as yfmStringify} from 'hexo-front-matter';
import { join, extname, basename } from 'path';
import { magenta } from 'picocolors';
import { load } from 'js-yaml';
import { slugize, escapeRegExp } from 'hexo-util';
import { copyDir, exists, listDir, mkdirs, readFile, rmdir, unlink, writeFile } from 'hexo-fs';
import { parse as yfmParse, split as yfmSplit, stringify as yfmStringify } from 'hexo-front-matter';
const preservedKeys = ['title', 'slug', 'path', 'layout', 'date', 'content'];

const rHexoPostRenderEscape = /<hexoPostRenderCodeBlock>([\s\S]+?)<\/hexoPostRenderCodeBlock>/g;
Expand Down
4 changes: 2 additions & 2 deletions lib/hexo/render.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {extname} from 'path';
import { extname } from 'path';
import Promise from 'bluebird';
import {readFile, readFileSync} from 'hexo-fs';
import { readFile, readFileSync } from 'hexo-fs';

const getExtname = str => {
if (typeof str !== 'string') return '';
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/router.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {EventEmitter} from 'events';
import { EventEmitter } from 'events';
import Promise from 'bluebird';
import Stream from 'stream';
const { Readable } = Stream;
Expand Down
4 changes: 2 additions & 2 deletions lib/hexo/scaffold.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {extname, join} from 'path';
import {exists, listDir, readFile, unlink, writeFile} from 'hexo-fs';
import { extname, join } from 'path';
import { exists, listDir, readFile, unlink, writeFile } from 'hexo-fs';

class Scaffold {
public context: any;
Expand Down
2 changes: 1 addition & 1 deletion lib/hexo/update_package.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {join} from 'path';
import { join } from 'path';
import { writeFile, exists, readFile } from 'hexo-fs';

export = ctx => {
Expand Down
2 changes: 1 addition & 1 deletion lib/models/asset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warehouse from 'warehouse';
import {join} from 'path';
import { join } from 'path';

export = ctx => {
const Asset = new warehouse.Schema({
Expand Down
2 changes: 1 addition & 1 deletion lib/models/category.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warehouse from 'warehouse';
import {slugize, full_url_for} from 'hexo-util';
import { slugize, full_url_for } from 'hexo-util';

export = ctx => {
const Category = new warehouse.Schema({
Expand Down
4 changes: 2 additions & 2 deletions lib/models/page.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import warehouse from 'warehouse';
import {join} from 'path';
import { join } from 'path';
import Moment from './types/moment';
import moment from 'moment';
import {full_url_for} from 'hexo-util';
import { full_url_for } from 'hexo-util';

export = ctx => {
const Page = new warehouse.Schema({
Expand Down
4 changes: 2 additions & 2 deletions lib/models/post.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import warehouse from 'warehouse';
import moment from 'moment';
import {extname, join, sep} from 'path';
import { extname, join, sep } from 'path';
import Promise from 'bluebird';
import Moment from './types/moment';
import {full_url_for} from 'hexo-util';
import { full_url_for } from 'hexo-util';

function pickID(data) {
return data._id;
Expand Down
2 changes: 1 addition & 1 deletion lib/models/post_asset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warehouse from 'warehouse';
import {join} from 'path';
import { join } from 'path';

export = ctx => {
const PostAsset = new warehouse.Schema({
Expand Down
2 changes: 1 addition & 1 deletion lib/models/tag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warehouse from 'warehouse';
import {slugize, full_url_for} from 'hexo-util';
import { slugize, full_url_for } from 'hexo-util';
const { hasOwnProperty: hasOwn } = Object.prototype;

export = ctx => {
Expand Down
2 changes: 1 addition & 1 deletion lib/models/types/moment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import warehouse from 'warehouse';
import {moment, toMomentLocale} from '../../plugins/helper/date';
import { moment, toMomentLocale } from '../../plugins/helper/date';

declare module 'moment' {
export default interface Moment extends moment.Moment {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yaml from 'js-yaml';
import { exists, writeFile } from 'hexo-fs';
import {extname} from 'path';
import { extname } from 'path';
import Promise from 'bluebird';

function configConsole(args) {
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/console/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {exists} from 'hexo-fs';
import {underline, magenta} from 'picocolors';
import { exists } from 'hexo-fs';
import { underline, magenta } from 'picocolors';

function deployConsole(args) {
let config = this.config.deploy;
Expand Down
10 changes: 5 additions & 5 deletions lib/plugins/console/generate.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {exists, writeFile, unlink, stat, mkdirs} from 'hexo-fs';
import {join} from 'path';
import { exists, writeFile, unlink, stat, mkdirs } from 'hexo-fs';
import { join } from 'path';
import Promise from 'bluebird';
import prettyHrtime from 'pretty-hrtime';
import {cyan, magenta} from 'picocolors';
import { cyan, magenta } from 'picocolors';
import tildify from 'tildify';
import {PassThrough} from 'stream';
import {createSha1Hash} from 'hexo-util';
import { PassThrough } from 'stream';
import { createSha1Hash } from 'hexo-util';

class Generater {
public context: any;
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/console/list/category.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {underline} from 'picocolors';
import { underline } from 'picocolors';
import table from 'text-table';
import {stringLength} from './common';
import { stringLength } from './common';

function listCategory() {
const categories = this.model('Category');
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/console/list/page.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {magenta, underline, gray} from 'picocolors';
import { magenta, underline, gray } from 'picocolors';
import table from 'text-table';
import {stringLength} from './common';
import { stringLength } from './common';

function listPage() {
const Page = this.model('Page');
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/console/list/post.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {gray, magenta, underline} from 'picocolors';
import { gray, magenta, underline } from 'picocolors';
import table from 'text-table';
import {stringLength} from './common';
import { stringLength } from './common';

function mapName(item) {
return item.name;
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/console/list/tag.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {magenta, underline} from 'picocolors';
import { magenta, underline } from 'picocolors';
import table from 'text-table';
import {stringLength} from './common';
import { stringLength } from './common';

function listTag() {
const Tag = this.model('Tag');
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/migrate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {underline, magenta} from 'picocolors';
import { underline, magenta } from '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.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tildify from 'tildify';
import {magenta} from 'picocolors';
import { magenta } from 'picocolors';
import { basename } from 'path';

const reservedKeys = {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/publish.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tildify from 'tildify';
import {magenta} from 'picocolors';
import { magenta } from 'picocolors';

function publishConsole(args) {
// Display help message if user didn't input any arguments
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/console/render.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {resolve} from 'path';
import { resolve } from 'path';
import tildify from 'tildify';
import prettyHrtime from 'pretty-hrtime';
import { writeFile } from 'hexo-fs';
import {cyan, magenta} from 'picocolors';
import { cyan, magenta } from 'picocolors';

function renderConsole(args) {
// Display help message if user didn't input any arguments
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/filter/after_post_render/external_link.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isExternalLink} from 'hexo-util';
import { isExternalLink } from 'hexo-util';
let EXTERNAL_LINK_POST_ENABLED = true;
const rATag = /<a(?:\s+?|\s+?[^<>]+?\s+?)href=["']((?:https?:|\/\/)[^<>"']+)["'][^<>]*>/gi;
const rTargetAttr = /target=/i;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/filter/after_render/external_link.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isExternalLink} from 'hexo-util';
import { isExternalLink } from 'hexo-util';

let EXTERNAL_LINK_SITE_ENABLED = true;
const rATag = /<a(?:\s+?|\s+?[^<>]+?\s+?)href=["']((?:https?:|\/\/)[^<>"']+)["'][^<>]*>/gi;
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/filter/new_post_path.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {join, extname} from 'path';
import { join, extname } from 'path';
import moment from 'moment';
import Promise from 'bluebird';
import {createSha1Hash, Permalink} from 'hexo-util';
import { createSha1Hash, Permalink } from 'hexo-util';
import { ensurePath } from 'hexo-fs';
let permalink;

Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/filter/post_permalink.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {createSha1Hash, Permalink, slugize} from 'hexo-util';
import {basename} from 'path';
import { createSha1Hash, Permalink, slugize } from 'hexo-util';
import { basename } from 'path';
let permalink;

function postPermalinkFilter(data) {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/filter/template_locals/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Pattern} from 'hexo-util';
import { Pattern } from 'hexo-util';

function i18nLocalsFilter(locals) {
const { i18n } = this.theme;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/generator/asset.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { exists, createReadStream } from 'hexo-fs';
import Promise from 'bluebird';
import {extname} from 'path';
import { extname } from 'path';
import { magenta } from 'picocolors';
import warehouse from 'warehouse';

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/helper/css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {htmlTag, url_for} from 'hexo-util';
import { htmlTag, url_for } from 'hexo-util';
import moize from 'moize';

function cssHelper(...args) {
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/helper/debug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {inspect} from 'util';
import { inspect } from 'util';

// this format object as string, resolves circular reference
function inspectObject(object, options) {
Expand Down
Loading

0 comments on commit 9d8764c

Please sign in to comment.