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:
Yangshun Tay 2018-06-23 23:47:48 -07:00 committed by GitHub
parent 9ff5328c88
commit 5a8e9a9ff1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2002 additions and 1995 deletions

View file

@ -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}`);
}
}
}