cli #6

Merged
SethTrowbridge merged 11 commits from cli into master 2023-09-24 09:33:29 -04:00
2 changed files with 6 additions and 7 deletions
Showing only changes of commit acda59303d - Show all commits

View File

@ -183,8 +183,7 @@ export async function Check()
if(!importMap[">able/app.tsx"]) if(!importMap[">able/app.tsx"])
{ {
const resp = confirm(`🤔 OPTIONAL: Import map has no specifier for your starter app (">able/app.tsx"). Create one?`); if(confirm(`🤔 OPTIONAL: Your import map does not override the default/empty FRONT-END app with the specifier ">able/app.tsx". Create this file and add the specifier?`))
if(resp)
{ {
importMap[">able/app.tsx"] = `./app.tsx`; importMap[">able/app.tsx"] = `./app.tsx`;
await bake(imports); await bake(imports);
@ -202,21 +201,20 @@ export async function Check()
catch(e) catch(e)
{ {
console.log(e); console.log(e);
if(confirm(`🚧 Your starter app ("${importMap[">able/app.tsx"]}") does not export a default function that returns VDOM nodes. Replace it?`)) if(confirm(`🚧 Your FRONT-END app ("${importMap[">able/app.tsx"]}") does not export a default function that returns VDOM nodes. Replace it?`))
{ {
await Install("app.tsx", importMap[">able/app.tsx"]); await Install("app.tsx", importMap[">able/app.tsx"]);
} }
else else
{ {
throw("⛔ Starter app has incorrect export types."); throw("⛔ Your FRONT-END app has incorrect export types.");
} }
} }
} }
if(!importMap[">able/api.tsx"]) if(!importMap[">able/api.tsx"])
{ {
const resp = confirm(`🤔 OPTIONAL: Import map has no specifier for your starter backend app (">able/api.tsx"). Create one?`); if(confirm(`🤔 OPTIONAL: Your import map does not override the default/empty BACK-END api with the specifier ">able/api.tsx". Create this file and add the specifier?`))
if(resp)
{ {
importMap[">able/api.tsx"] = "./api.tsx"; importMap[">able/api.tsx"] = "./api.tsx";
await bake(imports); await bake(imports);

View File

@ -2,7 +2,8 @@
"imports": { "imports": {
"react": "https://esm.sh/preact@10.16.0/compat", "react": "https://esm.sh/preact@10.16.0/compat",
"react/": "https://esm.sh/preact@10.16.0/compat/", "react/": "https://esm.sh/preact@10.16.0/compat/",
">able/": "file:///C:/Web%20Projects/able-baker/" ">able/": "file:///C:/Web%20Projects/able-baker/",
">able/app.tsx": "./app.tsx"
}, },
"compilerOptions": { "compilerOptions": {
"jsx": "react-jsx", "jsx": "react-jsx",