Skip to content

Commit

Permalink
Exclude vendor dir from directory tree printing (#798)
Browse files Browse the repository at this point in the history
* Exclude vendor dir for directory tree printing

* Upgrade tree-node-cli

* Upgrade tree-node-cli

* Update package-lock.json
  • Loading branch information
yangshun committed Jun 24, 2018
1 parent 9ff5328 commit 5a8e9a9
Show file tree
Hide file tree
Showing 4 changed files with 2,002 additions and 1,995 deletions.
17 changes: 12 additions & 5 deletions lib/copy-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}
}

Expand Down
Loading

0 comments on commit 5a8e9a9

Please sign in to comment.