Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more functional to docs command #448

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
mvnw support
SenjeyB committed Dec 25, 2024
commit 464a0126fcf8dd3f77c2b787807bf6c70a08b33a
41 changes: 23 additions & 18 deletions src/commands/docs.js
Original file line number Diff line number Diff line change
@@ -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);
}