From 2fcb04c408263154db03f525e4af88b43cc6c156 Mon Sep 17 00:00:00 2001 From: Florian Pichler Date: Fri, 9 Aug 2024 15:13:34 +0200 Subject: [PATCH] Add -o / --outDir option for output folder --- bin/auto-reveal.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/auto-reveal.js b/bin/auto-reveal.js index 01bff4b..793925e 100755 --- a/bin/auto-reveal.js +++ b/bin/auto-reveal.js @@ -63,6 +63,15 @@ program program .command('build') .description('Build a static copy of your presentation.') - .action(() => build(config)); + .option('-o, --outDir ', 'Output directory', config.build.outDir) + .action((options) => + build({ + ...config, + build: { + ...config.build, + outDir: path.resolve(cwd, options.outDir) ?? config.build.outDir, + }, + }), + ); program.parse();