Skip to content

Commit

Permalink
mvnw support
Browse files Browse the repository at this point in the history
  • Loading branch information
SenjeyB committed Dec 25, 2024
1 parent 435e4f3 commit 464a012
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions src/commands/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,33 @@ module.exports = function(opts) {
}

try {
const allFiles = readXmirFilesRecursively(inputDir);

const packages = new Set();
allFiles.forEach(filePath => {
const packageName = getPackageNameFromFilePath(filePath);
packages.add(packageName);
});
const argv = ['eo:docs'].concat(flags(opts));
mvnw(argv, opts.target || '.', opts.batch).then(() => {
const allFiles = readXmirFilesRecursively(inputDir);

for (const packageName of packages) {
const fileName = sanitizeFileName(packageName || 'default');
const outputPath = path.join(outputDir, fileName);

fs.writeFileSync(outputPath, '');
}
const packages = new Set();
allFiles.forEach((filePath) => {
const packageName = getPackageNameFromFilePath(filePath);
packages.add(packageName);
});

const packagesPath = path.join(outputDir, 'packages.html');
fs.writeFileSync(packagesPath, '');
for (const packageName of packages) {
const fileName = sanitizeFileName(packageName || 'default');
const outputPath = path.join(outputDir, fileName);

const cssPath = path.join(outputDir, 'styles.css');
fs.writeFileSync(cssPath, '');
fs.writeFileSync(outputPath, '');
}

const packagesPath = path.join(outputDir, 'packages.html');
fs.writeFileSync(packagesPath, '');

console.info('Documentation generation completed in %s directory', outputDir);
const cssPath = path.join(outputDir, 'styles.css');
fs.writeFileSync(cssPath, '');

console.info('Documentation generation completed in %s directory', outputDir);
}).catch((error) => {
console.error('Error executing Maven command:', error);
});
} catch (error) {
console.error('Error generating documentation:', error);
}
Expand Down

0 comments on commit 464a012

Please sign in to comment.