feat(create-pca): support optional config file output
This commit is contained in:
@@ -238,12 +238,19 @@ Options:
|
||||
} else {
|
||||
console.log(`Created application '${appName}'`);
|
||||
}
|
||||
console.log(`appId: ${appId}`);
|
||||
console.log(`export const config = {
|
||||
const configTemplate = `export const config = {
|
||||
"appName": "${appName}",
|
||||
"tenantId": "${tenantId}",
|
||||
"clientId": "${appId}"
|
||||
};`);
|
||||
};`;
|
||||
|
||||
if (configPath) {
|
||||
const targetPath = path.resolve(configPath);
|
||||
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
|
||||
fs.writeFileSync(targetPath, `${configTemplate}\n`, "utf8");
|
||||
}
|
||||
|
||||
console.log(configTemplate);
|
||||
}
|
||||
|
||||
main().catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user