@codebynithin/time-entry
Version:
Nithin time entry cli
23 lines (18 loc) • 479 B
JavaScript
const { init, switchDefaultProject } = require('./services/init-config');
const { processArgs } = require('./services/process-commands');
const initNpm = async () => {
let [type, ...value] = (process.argv || []).splice(2);
if (!type) {
type = 'h';
}
if (type === 'init') {
init();
} else if (type === 'switch') {
switchDefaultProject();
} else {
processArgs(type, value?.join(' '));
}
};
initNpm();
module.exports = initNpm;