mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
Exclude vendor dir from directory tree printing (#798)
* Exclude vendor dir for directory tree printing * Upgrade tree-node-cli * Upgrade tree-node-cli * Update package-lock.json
This commit is contained in:
parent
9ff5328c88
commit
5a8e9a9ff1
4 changed files with 2002 additions and 1995 deletions
|
@ -203,11 +203,18 @@ if (feature === 'translations') {
|
|||
});
|
||||
|
||||
if (exampleSiteCreated) {
|
||||
const tree = require('tree-node-cli');
|
||||
const dirString = tree(path.join(CWD, '..'), {
|
||||
exclude: [/node_modules/],
|
||||
});
|
||||
console.log(dirString);
|
||||
try {
|
||||
const tree = require('tree-node-cli');
|
||||
const dirString = tree(path.join(CWD, '..'), {
|
||||
exclude: [
|
||||
/node_modules/, // npm
|
||||
/vendor/, // composer
|
||||
],
|
||||
});
|
||||
console.log(dirString);
|
||||
} catch (error) {
|
||||
console.warn(`Error printing directory: ${error}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue