mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 10:48:05 +02:00
Print out directory tree during docusaurus-init (#665)
* WIP does not work * rm -rf website/ Run docusaurus-init Even by deleting text here, it still shows up? Confused. * Shift in tree printing logic * Shift printing logic to the current location
This commit is contained in:
parent
c730bc7bb7
commit
1796764b1c
3 changed files with 16 additions and 9 deletions
|
@ -201,14 +201,14 @@ if (feature === 'translations') {
|
|||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (exampleSiteCreated) {
|
||||
console.log(
|
||||
`${chalk.green('Example website created')} in ${chalk.green(
|
||||
outerFolder + '/website'
|
||||
)}\n`
|
||||
);
|
||||
if (exampleSiteCreated) {
|
||||
const tree = require('tree-node-cli');
|
||||
const dirString = tree(path.join(CWD, '..'), {
|
||||
exclude: [/node_modules/],
|
||||
});
|
||||
console.log(dirString);
|
||||
}
|
||||
}
|
||||
|
||||
if (docsCreated) {
|
||||
|
|
|
@ -57,7 +57,8 @@
|
|||
"request": "^2.81.0",
|
||||
"shelljs": "^0.7.8",
|
||||
"sitemap": "^1.13.0",
|
||||
"tcp-port-used": "^0.1.2"
|
||||
"tcp-port-used": "^0.1.2",
|
||||
"tree-node-cli": "^1.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"docusaurus-start": "./lib/start-server.js",
|
||||
|
|
|
@ -1327,7 +1327,7 @@ combined-stream@1.0.6, combined-stream@~1.0.5:
|
|||
dependencies:
|
||||
delayed-stream "~1.0.0"
|
||||
|
||||
commander@^2.11.0:
|
||||
commander@^2.11.0, commander@^2.15.1:
|
||||
version "2.15.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
|
||||
|
||||
|
@ -5596,6 +5596,12 @@ tr46@~0.0.3:
|
|||
version "0.0.3"
|
||||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
|
||||
|
||||
tree-node-cli@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.1.1.tgz#ea11f7e6ceec670355c64d0cc9b7090dddaefc33"
|
||||
dependencies:
|
||||
commander "^2.15.1"
|
||||
|
||||
trim-newlines@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
|
||||
|
|
Loading…
Add table
Reference in a new issue