command.js
This file
Path
lib/arguments/command.js
19 lines · 730 bytes · JavaScript
Last changed by
Add more code comments (#984)ehmickybefore adoptionfdd8a9f
History of this fileTake it
Split files into smaller ones (#976)ehmickybefore adoptiond7c6853
lines 1–6why, one step back1import {logCommand} from '../verbose/start.js';2import {getVerboseInfo} from '../verbose/info.js';3import {getStartTime} from '../return/duration.js';4import {joinCommand} from './escape.js';5import {normalizeFdSpecificOption} from './specific.js';6Add more code comments (#984)ehmickybefore adoptionfdd8a9f
line 7why, one step back7// Compute `result.command`, `result.escapedCommand` and `verbose`-related informationUpgrade xo (#980)ehmickybefore adoptionccfa412
line 8why, one step back8export const handleCommand = (filePath, rawArguments, rawOptions) => {Split files into smaller ones (#976)ehmickybefore adoptiond7c6853
line 9why, one step back9 const startTime = getStartTime();Upgrade xo (#980)ehmickybefore adoptionccfa412
line 10why, one step back10 const {command, escapedCommand} = joinCommand(filePath, rawArguments);Split files into smaller ones (#976)ehmickybefore adoptiond7c6853
lines 11–12why, one step back11 const verboseInfo = getVerboseInfo(normalizeFdSpecificOption(rawOptions, 'verbose'));12 logCommand(escapedCommand, verboseInfo, rawOptions);Upgrade xo (#980)ehmickybefore adoptionccfa412
lines 13–18why, one step back13 return {14 command,15 escapedCommand,16 startTime,17 verboseInfo,18 };Split files into smaller ones (#976)ehmickybefore adoptiond7c6853
line 19why, one step back19};