mirror of
https://github.com/Rushilwiz/spaceout.git
synced 2025-04-22 20:39:50 -04:00
20 lines
445 B
JavaScript
20 lines
445 B
JavaScript
const path = require('path');
|
|
|
|
/**
|
|
* Resolves the output flag
|
|
* @param {args} args - Parsed arguments passed to the CLI
|
|
*/
|
|
const resolveOutput = (args) => {
|
|
const { outputPath } = args;
|
|
const finalOptions = {
|
|
options: { output: {} },
|
|
outputOptions: {},
|
|
};
|
|
if (outputPath) {
|
|
finalOptions.options.output.path = path.resolve(outputPath);
|
|
}
|
|
return finalOptions;
|
|
};
|
|
|
|
module.exports = resolveOutput;
|