Skip to content

Commit

Permalink
refactored some code
Browse files Browse the repository at this point in the history
  • Loading branch information
dev2-nomo committed Nov 20, 2023
1 parent 63b4269 commit 8f44d19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
27 changes: 0 additions & 27 deletions nomo_cli.config.js

This file was deleted.

7 changes: 0 additions & 7 deletions out/nomo_manifest.json

This file was deleted.

8 changes: 5 additions & 3 deletions src/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ async function getUserInput(prompt: string): Promise<string> {
}

async function generateNomoManifestContent(
webonId: string
webonId: string,
webonName: string
): Promise<NomoManifest> {
return {
nomo_manifest_version: "1.1.0",
webon_id: webonId,
webon_name: await getUserInput("Enter webon_name: "),
webon_name: webonName,
webon_version: "0.1.0",
permissions: [],
};
Expand Down Expand Up @@ -64,8 +65,9 @@ export async function init(args: { assetDir: string }): Promise<void> {
if (fs.existsSync(manifestFilePath)) {
console.log("nomo_manifest.json already exists.");
} else {
const webonName = await getUserInput("Enter webon_name: ");
const webonId = await getUserInput("Enter webon_id: ");
const nomoManifest = await generateNomoManifestContent(webonId);
const nomoManifest = await generateNomoManifestContent(webonId, webonName);

writeFile({
filePath: manifestFilePath,
Expand Down

0 comments on commit 8f44d19

Please sign in to comment.