docs: simplify command used to populate permission tuturial code

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2022-03-14 15:34:50 +00:00
committed by Joon Park
parent c8b8424f11
commit 74d59fc59b
+4 -10
View File
@@ -20,16 +20,10 @@ The source code is available here:
1. Copy-paste the two folders into the plugins folder of your backstage application repository or run the following script from the root of your backstage application:
```bash
$ node -e "const{UrlReaders}=require('@backstage/backend-common');\
const{ConfigReader}=require('@backstage/config');\
const winston=require('winston');const{outputFile}=require('fs-extra');\
const path=require('path');const logger=winston.createLogger({level:'info',});\
const config=new ConfigReader({});(async function execute(){\
const reader=UrlReaders.default({logger,config});const files=await reader.readTree(\
'https://github.com/backstage/backstage/tree/permission-docs\
/contrib/plugins');return Promise.all((await files.files()).map(async file=>\
file.path!=='README.md'&&outputFile(path.join(__dirname,'plugins',file.path),\
await file.content(),),),).catch(console.log)})()"
$ curl https://codeload.github.com/backstage/backstage/zip/refs/heads/master | \
tar -C plugins --strip-components=1 -xv \
backstage-master/contrib/plugins/todo-list \
backstage-master/contrib/plugins/todo-list-backend
```
Your application structure should look something like this: