Includes templates in @backstage/repo-tools package and use them in the CLI
Signed-off-by: Taras Mankovski <taras@frontside.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/repo-tools': patch
|
||||
---
|
||||
|
||||
Includes templates in @backstage/repo-tools package and use them in the CLI
|
||||
@@ -32,6 +32,7 @@
|
||||
"dependencies": {
|
||||
"@apidevtools/swagger-parser": "^10.1.0",
|
||||
"@apisyouwonthate/style-guide": "^1.4.0",
|
||||
"@backstage/backend-common": "workspace:^",
|
||||
"@backstage/catalog-model": "workspace:^",
|
||||
"@backstage/cli-common": "workspace:^",
|
||||
"@backstage/cli-node": "workspace:^",
|
||||
@@ -85,7 +86,8 @@
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"dist/**/*.js"
|
||||
"dist/**/*.js",
|
||||
"templates"
|
||||
],
|
||||
"nodemonConfig": {
|
||||
"watch": "./src",
|
||||
|
||||
@@ -21,6 +21,7 @@ import { paths as cliPaths } from '../../../lib/paths';
|
||||
import { mkdirpSync } from 'fs-extra';
|
||||
import fs from 'fs-extra';
|
||||
import { exec } from '../../../lib/exec';
|
||||
import { resolvePackagePath } from '@backstage/backend-common';
|
||||
|
||||
async function generate(spec: string, outputDirectory: string) {
|
||||
const resolvedOpenapiPath = resolve(spec);
|
||||
@@ -47,7 +48,15 @@ async function generate(spec: string, outputDirectory: string) {
|
||||
'-g',
|
||||
'typescript',
|
||||
'-c',
|
||||
'templates/typescript-backstage.yaml',
|
||||
resolvePackagePath(
|
||||
'@backstage/repo-tools',
|
||||
'templates/typescript-backstage.yaml',
|
||||
),
|
||||
'-t',
|
||||
resolvePackagePath(
|
||||
'@backstage/repo-tools',
|
||||
'templates/typescript-backstage',
|
||||
),
|
||||
'--generator-key',
|
||||
'v3.0',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user