Comparing version 0.0.23 to 0.0.24
@@ -8,2 +8,3 @@ import type { Plugin } from '../plugin'; | ||
* 3. 提供配置载入功能 | ||
* 4. 提供插件自动载入支持 | ||
*/ | ||
@@ -10,0 +11,0 @@ export default class CustomConfigPlugin implements Plugin { |
@@ -12,2 +12,3 @@ "use strict"; | ||
* 3. 提供配置载入功能 | ||
* 4. 提供插件自动载入支持 | ||
*/ | ||
@@ -34,2 +35,3 @@ class CustomConfigPlugin { | ||
} | ||
cli.option('--no-autoload-plugins', '关闭自动载入插件功能'); | ||
}); | ||
@@ -40,3 +42,3 @@ if (!this.shouldLoadConfig) | ||
runner.hooks.loadConfig.tapPromise(this.name, async function (command) { | ||
var _a, _b, _c; | ||
var _a, _b, _c, _d; | ||
// 忽略配置的情况下, 不载入用户配置 | ||
@@ -55,3 +57,6 @@ const ignoreConfigField = lodash_1.default.camelCase(`ignore-${optionName}`); | ||
// 自动载入匹配规则的插件,未配置 patterns 的时候,不执行该逻辑 | ||
await runner.config.autoLoadPlugins(); | ||
// 仅当未关闭该功能时执行 | ||
if (((_d = command === null || command === void 0 ? void 0 : command.options) === null || _d === void 0 ? void 0 : _d.autoloadPlugins) !== false) { | ||
await runner.config.autoLoadPlugins(); | ||
} | ||
}); | ||
@@ -58,0 +63,0 @@ } |
{ | ||
"name": "takin", | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "Front end engineering base toolchain and scaffold", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
131363
3573