Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Mar 11, 2023
1 parent a4dad2c commit 73d5ef9
Show file tree
Hide file tree
Showing 34 changed files with 136 additions and 136 deletions.
8 changes: 4 additions & 4 deletions lib/box/file.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {readFile, readFileSync, stat, statSync} from 'hexo-fs';

class File {
public source: any;
public path: any;
public params: any;
public type: any;
public source: any;
public path: any;
public params: any;
public type: any;

constructor({ source, path, params, type }) {
this.source = source;
Expand Down
24 changes: 12 additions & 12 deletions lib/box/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import {isMatch, makeRe} from 'micromatch';
const defaultPattern = new Pattern(() => ({}));

class Box extends EventEmitter {
public options: any;
public context: any;
public base: any;
public processors: any;
public _processingFiles: any;
public watcher: any;
public Cache: any;
public File: any;
public ignore: any;
public source: any;
public emit: any;
public ctx: any;
public options: any;
public context: any;
public base: any;
public processors: any;
public _processingFiles: any;
public watcher: any;
public Cache: any;
public File: any;
public ignore: any;
public source: any;
public emit: any;
public ctx: any;

constructor(ctx, base, options) {
super();
Expand Down
4 changes: 2 additions & 2 deletions lib/extend/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import abbrev from 'abbrev';
*/

class Console {
public store: any;
public alias: any;
public store: any;
public alias: any;

constructor() {
this.store = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/deployer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Promise from 'bluebird';

class Deployer {
public store: any;
public store: any;

constructor() {
this.store = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const typeAlias = {
};

class Filter {
public store: any;
public store: any;

constructor() {
this.store = {};
Expand Down
4 changes: 2 additions & 2 deletions lib/extend/generator.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Promise from 'bluebird';

class Generator {
public id: any;
public store: any;
public id: any;
public store: any;

constructor() {
this.id = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Helper {
public store: any;
public store: any;

constructor() {
this.store = {};
Expand Down
6 changes: 3 additions & 3 deletions lib/extend/injector.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {Cache} from 'hexo-util';

class Injector {
public store: any;
public cache: any;
public page: any;
public store: any;
public cache: any;
public page: any;

constructor() {
this.store = {
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/migrator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Promise from 'bluebird';

class Migrator {
public store: any;
public store: any;

constructor() {
this.store = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/extend/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Promise from 'bluebird';
import {Pattern} from 'hexo-util';

class Processor {
public store: any;
public store: any;

constructor() {
this.store = [];
Expand Down
4 changes: 2 additions & 2 deletions lib/extend/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const getExtname = str => {
};

class Renderer {
public store: any;
public storeSync: any;
public store: any;
public storeSync: any;

constructor() {
this.store = {};
Expand Down
8 changes: 4 additions & 4 deletions lib/extend/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const rCodeTag = /<code[^<>]*>[\s\S]+?<\/code>/g;
const escapeSwigTag = str => str.replace(/{/g, '&#123;').replace(/}/g, '&#125;');

class NunjucksTag {
public tags: any;
public fn: any;
public tags: any;
public fn: any;

constructor(name, fn) {
this.tags = [name];
Expand Down Expand Up @@ -181,8 +181,8 @@ const formatNunjucksError = (err, input, source = '') => {
};

class Tag {
public env: any;
public source: any;
public env: any;
public source: any;

constructor() {
this.env = new Environment(null, {
Expand Down
74 changes: 37 additions & 37 deletions lib/hexo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
Migrator,
Processor,
Renderer,
Tag,
Tag
} from '../extend';

import Render from './render';
Expand Down Expand Up @@ -106,42 +106,42 @@ function debounce(func, wait) {
}

class Hexo extends EventEmitter {
public base_dir: any;
public public_dir: any;
public source_dir: any;
public plugin_dir: any;
public script_dir: any;
public scaffold_dir: any;
public theme_dir: any;
public theme_script_dir: any;
public env: any;
public extend: any;
public config: any;
public log: any;
public render: any;
public route: any;
public post: any;
public scaffold: any;
public _dbLoaded: any;
public _isGenerating: any;
public database: any;
public config_path: any;
public source: any;
public theme: any;
public locals: any;
public version: any;
public emit: any;
public _watchBox: any;
public page: any;
public path: any;
public url: any;
public layout: any;
public view_dir: any;
public site: any;
public args: any;
public cache: any;
public alias: any;
public data: any;
public base_dir: any;
public public_dir: any;
public source_dir: any;
public plugin_dir: any;
public script_dir: any;
public scaffold_dir: any;
public theme_dir: any;
public theme_script_dir: any;
public env: any;
public extend: any;
public config: any;
public log: any;
public render: any;
public route: any;
public post: any;
public scaffold: any;
public _dbLoaded: any;
public _isGenerating: any;
public database: any;
public config_path: any;
public source: any;
public theme: any;
public locals: any;
public version: any;
public emit: any;
public _watchBox: any;
public page: any;
public path: any;
public url: any;
public layout: any;
public view_dir: any;
public site: any;
public args: any;
public cache: any;
public alias: any;
public data: any;

constructor(base = process.cwd(), args = {}) {
super();
Expand Down
4 changes: 2 additions & 2 deletions lib/hexo/locals.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Cache} from 'hexo-util';

class Locals {
public cache: any;
public getters: any;
public cache: any;
public getters: any;

constructor() {
this.cache = new Cache();
Expand Down
4 changes: 2 additions & 2 deletions lib/hexo/multi_config_path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'hexo-fs';
import yml from 'js-yaml';
import {deepMerge} from 'hexo-util';

export default ctx => (function multiConfigPath(base, configPaths, outputDir) {
export default ctx => function multiConfigPath(base, configPaths, outputDir) {
const { log } = ctx;
const defaultPath = join(base, '_config.yml');

Expand Down Expand Up @@ -72,4 +72,4 @@ export default ctx => (function multiConfigPath(base, configPaths, outputDir) {

// write file and return path
return outputPath;
});
};
12 changes: 6 additions & 6 deletions lib/hexo/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const isNonWhiteSpaceChar = char => char !== '\r'
&& char !== ' ';

class PostRenderEscape {
public stored: any;
public length: any;
public stored: any;
public length: any;

constructor() {
this.stored = [];
Expand Down Expand Up @@ -219,10 +219,10 @@ const createAssetFolder = (path, assetFolder) => {
};

class Post {
public context: any;
public config: any;
public tag: any;
public separator: any;
public context: any;
public config: any;
public tag: any;
public separator: any;

constructor(context) {
this.context = context;
Expand Down
4 changes: 2 additions & 2 deletions lib/hexo/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const toString = (result, options) => {
};

class Render {
public context: any;
public renderer: any;
public context: any;
public renderer: any;

constructor(ctx) {
this.context = ctx;
Expand Down
14 changes: 7 additions & 7 deletions lib/hexo/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import Stream from 'stream';
const { Readable } = Stream;

class RouteStream extends Readable {
public _data: any;
public _ended: any;
public modified: any;
public push: any;
public emit: any;
public _data: any;
public _ended: any;
public modified: any;
public push: any;
public emit: any;

constructor(data) {
super({ objectMode: true });
Expand Down Expand Up @@ -93,8 +93,8 @@ const _format = path => {
};

class Router extends EventEmitter {
public routes: any;
public emit: any;
public routes: any;
public emit: any;

constructor() {
super();
Expand Down
6 changes: 3 additions & 3 deletions lib/hexo/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {extname, join} from 'path';
import {exists, listDir, readFile, unlink, writeFile} from 'hexo-fs';

class Scaffold {
public context: any;
public scaffoldDir: any;
public defaults: any;
public context: any;
public scaffoldDir: any;
public defaults: any;

constructor(context) {
this.context = context;
Expand Down
2 changes: 1 addition & 1 deletion lib/models/types/moment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {SchemaType} from 'warehouse';
import {moment, toMomentLocale} from '../../plugins/helper/date';

class SchemaTypeMoment extends SchemaType {
public options: any;
public options: any;

constructor(name, options = {}) {
super(name, options);
Expand Down
22 changes: 11 additions & 11 deletions lib/plugins/console/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import {PassThrough} from 'stream';
import {createSha1Hash} from 'hexo-util';

class Generater {
public context: any;
public force: any;
public bail: any;
public concurrency: any;
public watch: any;
public deploy: any;
public generatingFiles: any;
public start: any;
public args: any;
public route: any;
public log: any;
public context: any;
public force: any;
public bail: any;
public concurrency: any;
public watch: any;
public deploy: any;
public generatingFiles: any;
public start: any;
public args: any;
public route: any;
public log: any;

constructor(ctx, args) {
this.context = ctx;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/console/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ export default function(ctx) {
{name: '--pretty', desc: 'Prettify JSON output'}
]
}, require('./render'));
};
}
2 changes: 1 addition & 1 deletion lib/plugins/helper/fragment_cache.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';

import {Cache} from 'hexo-util';

export default ctx => {
Expand Down
Loading

0 comments on commit 73d5ef9

Please sign in to comment.