From 128ae21088a04313de5f8e525e780064c51542ca Mon Sep 17 00:00:00 2001 From: mdnapo Date: Fri, 26 Jul 2024 16:57:28 +0200 Subject: [PATCH] Clean up --- README.md | 3 --- docs/docs/command_plugins.md | 10 +++++++--- docs/docusaurus.config.ts | 12 ++++++------ docs/src/components/HomepageFeatures/index.tsx | 14 ++++++++------ docs/src/pages/index.tsx | 2 +- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 27236ba..dc57d9b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,3 @@ - Add a CLI UI library - Clean up README files -- Theme the site with a custom color scheme and icon/logos -- Elaborate on terminology and best practices, like meaningful service names (also emphasize common sense?) -- Fix bug in HelloWorldCommand.ExecuteAsync diff --git a/docs/docs/command_plugins.md b/docs/docs/command_plugins.md index 9413f0a..9bae30f 100644 --- a/docs/docs/command_plugins.md +++ b/docs/docs/command_plugins.md @@ -133,12 +133,16 @@ public class DotenvCommand : Command, ISubCommandOf private async Task ExecuteAsync(string vars, bool overwrite) { var path = Path.Join(Environment.CurrentDirectory, ".env"); - var exists = File.Exists(path); - if (exists && !overwrite) + if (File.Exists(path)) { + if (overwrite) + { + await _context.WriteFile(".env", content); + return; + } + Console.WriteLine($"File {path} already exists, add the -o or --overwrite flag to overwrite it."); - return; } var content = string.Join(Environment.NewLine, vars.Split(';')); diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index a786037..713320e 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -4,8 +4,8 @@ import type * as Preset from '@docusaurus/preset-classic'; const config: Config = { title: 'MycroForge', - tagline: 'Your FastAPI & SQLAlchemy assistant!', - favicon: 'img/favicon.ico', + tagline: 'Your FastAPI & SQLAlchemy toolkit!', + // favicon: 'img/favicon.ico', // Set the production url of your site here url: 'https://git.devdisciples.com', @@ -52,10 +52,10 @@ const config: Config = { image: 'img/docusaurus-social-card.jpg', navbar: { title: 'MycroForge', - logo: { - alt: 'MycroForge Logo', - src: 'img/logo.svg', - }, + // logo: { + // alt: 'MycroForge Logo', + // src: 'img/logo.svg', + // }, items: [ { type: 'docSidebar', diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index 7656165..47ea316 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -4,14 +4,14 @@ import styles from './styles.module.css'; type FeatureItem = { title: string; - Svg: React.ComponentType>; + // Svg: React.ComponentType>; description: JSX.Element; }; const FeatureList: FeatureItem[] = [ { title: 'Initialize a Skeleton Project Quickly', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + // Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, description: ( <> Start a new FastAPI and SQLAlchemy project with a single command. @@ -21,7 +21,7 @@ const FeatureList: FeatureItem[] = [ }, { title: 'Generate Common Items', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + // Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, description: ( <> Use MycroForge to generate boilerplate code for entities, services, and routers. @@ -31,7 +31,8 @@ const FeatureList: FeatureItem[] = [ }, { title: 'Extend MycroForge', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + // Svg: '', + // Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, description: ( <> Create plugins to extend MycroForge with your own custom commands. @@ -40,11 +41,12 @@ const FeatureList: FeatureItem[] = [ }, ]; -function Feature({ title, Svg, description }: FeatureItem) { +function Feature({ title, description }: FeatureItem) { +// function Feature({ title, Svg, description }: FeatureItem) { return (
- + {/* */}
{title} diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 207bace..284ddd4 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -32,7 +32,7 @@ export default function Home(): JSX.Element { const {siteConfig} = useDocusaurusContext(); return (