Remove output option

This commit is contained in:
Will Boyd
2025-01-20 16:28:36 -05:00
parent 2add380406
commit bafe869221
4 changed files with 6 additions and 8 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
import path from 'path';
import process from 'process';
import * as parser from './src/parser.js';
import * as settings from './src/settings.js';
import * as wizard from './src/wizard.js';
import * as writer from './src/writer.js';
@@ -18,7 +19,7 @@ import * as writer from './src/writer.js';
// happy goodbye
console.log('\nAll done!');
console.log('Look for your output files in: ' + path.resolve(config.output));
console.log('Look for your output files in: ' + path.resolve(settings.output_directory));
})().catch(ex => {
// sad goodbye
console.log('\nSomething went wrong, execution halted early.');
+3
View File
@@ -49,3 +49,6 @@ export const filter_post_types = [
'wp_global_styles',
'wp_navigation'
];
// Output directory.
export const output_directory = 'output';
-6
View File
@@ -19,12 +19,6 @@ const options = [
description: 'Path to WordPress export file',
default: 'export.xml'
},
{
name: 'output',
type: 'folder',
description: 'Path to output folder',
default: 'output'
},
{
name: 'year-folders',
type: 'boolean',
+1 -1
View File
@@ -180,7 +180,7 @@ function getPostPath(post, config) {
}
// start with base output dir and post type
const pathSegments = [config.output, post.meta.type];
const pathSegments = [settings.output_directory, post.meta.type];
if (config.yearFolders) {
pathSegments.push(dt.toFormat('yyyy'));