@micro-app/cli
Version:
[CLI] Pluggable micro application framework.
39 lines (31 loc) • 711 B
JavaScript
;
const extendConfigs = [
'server',
];
const commands = [
'version',
'start',
'serve',
'update',
// 'init',
'check',
'build',
'clean',
];
const BUILT_IN = Symbol.for('built-in');
module.exports = function(service) {
extendConfigs.forEach(name => {
service.registerPlugin({
id: `cli:plugin-extend-${name}`,
link: require.resolve(`./extends/${name}`),
[BUILT_IN]: true,
});
});
commands.forEach(name => {
service.registerPlugin({
id: `cli:plugin-command-${name}`,
link: require.resolve(`./commands/${name}`),
[BUILT_IN]: true,
});
});
};