From 27d313ba7aa904958e70a6f2951d73ef7668a6b2 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Thu, 24 Nov 2022 23:19:37 +0800 Subject: [PATCH] use top-level import --- lib/extend/index.js | 24 ++++++++++++++---------- lib/models/index.js | 24 ++++++++++++++---------- lib/plugins/console/list/index.js | 11 ++++++----- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/lib/extend/index.js b/lib/extend/index.js index 5e4eb37b28..fded0037cf 100644 --- a/lib/extend/index.js +++ b/lib/extend/index.js @@ -1,12 +1,16 @@ 'use strict'; -exports.Console = require('./console'); -exports.Deployer = require('./deployer'); -exports.Filter = require('./filter'); -exports.Generator = require('./generator'); -exports.Helper = require('./helper'); -exports.Injector = require('./injector'); -exports.Migrator = require('./migrator'); -exports.Processor = require('./processor'); -exports.Renderer = require('./renderer'); -exports.Tag = require('./tag'); +const Console = require('./console'); +const Deployer = require('./deployer'); +const Filter = require('./filter'); +const Generator = require('./generator'); +const Helper = require('./helper'); +const Injector = require('./injector'); +const Migrator = require('./migrator'); +const Processor = require('./processor'); +const Renderer = require('./renderer'); +const Tag = require('./tag'); + +module.exports = { + Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag +}; diff --git a/lib/models/index.js b/lib/models/index.js index f52d915e1b..18ae185867 100644 --- a/lib/models/index.js +++ b/lib/models/index.js @@ -1,12 +1,16 @@ 'use strict'; -exports.Asset = require('./asset'); -exports.Cache = require('./cache'); -exports.Category = require('./category'); -exports.Data = require('./data'); -exports.Page = require('./page'); -exports.Post = require('./post'); -exports.PostAsset = require('./post_asset'); -exports.PostCategory = require('./post_category'); -exports.PostTag = require('./post_tag'); -exports.Tag = require('./tag'); +const Asset = require('./asset'); +const Cache = require('./cache'); +const Category = require('./category'); +const Data = require('./data'); +const Page = require('./page'); +const Post = require('./post'); +const PostAsset = require('./post_asset'); +const PostCategory = require('./post_category'); +const PostTag = require('./post_tag'); +const Tag = require('./tag'); + +module.exports = { + Asset, Cache, Category, Data, Page, Post, PostAsset, PostCategory, PostTag, Tag +}; diff --git a/lib/plugins/console/list/index.js b/lib/plugins/console/list/index.js index 4ab6fba1d0..debab88983 100644 --- a/lib/plugins/console/list/index.js +++ b/lib/plugins/console/list/index.js @@ -1,13 +1,14 @@ 'use strict'; const abbrev = require('abbrev'); +const page = require('./page'); +const post = require('./post'); +const route = require('./route'); +const tag = require('./tag'); +const category = require('./category'); const store = { - page: require('./page'), - post: require('./post'), - route: require('./route'), - tag: require('./tag'), - category: require('./category') + page, post, route, tag, category }; const alias = abbrev(Object.keys(store));