@sodacore/cli
Version:
Sodacore CLI is a plugin that offers CLI functionality within the framework.
9 lines (8 loc) • 347 B
JavaScript
import { Utils } from '@sodacore/di';
export default function Script(name, args, flags) {
return (target, propertyKey) => {
const methods = Utils.getMeta('methods', 'cli')(target, undefined, []);
methods.push({ key: String(propertyKey), name, args, flags });
Utils.setMeta('methods', 'http')(target, methods);
};
}