pyr
Version:
A package for creating a script to store and run your most commonly used CLI commands
39 lines (31 loc) • 700 B
JavaScript
const {
Parser
} = require('src/parser');
const {
safeExit
} = require('src/utility');
const Operation = require('src/program/operations/operation');
const EXPECTED_ARGUMENTS_LENGTH = 1;
const handler = args => {
const ymlFileName = args[0];
Parser.updateScript(ymlFileName);
safeExit();
};
const operation = {
name: 'update',
flag: 'u',
description: 'process and update a script',
args: [{
name: 'script name',
required: true
},
{
name: 'path to .yml file',
required: true
}
],
whitelist: [],
run: handler
};
module.exports = new Operation(operation);