Skip to content

Commit b0917e9

Browse files
committed
feat: Implement Docusaurus documentation site
1 parent 1db14bf commit b0917e9

8 files changed

Lines changed: 319 additions & 40 deletions

File tree

docs/USAGE.md renamed to docs/docs/USAGE.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- @format -->
2+
13
# Usage Guide for @involvex/create-wizard
24

35
This document provides a detailed guide on how to use the `@involvex/create-wizard` CLI tool to create new JavaScript projects. This tool is designed to provide a comprehensive, all-in-one project configuration, streamlining project initialization, reducing manual setup, ensuring consistency, and accelerating developer onboarding.
@@ -41,17 +43,17 @@ Choose one of the available project templates. Each template provides a complete
4143

4244
The selected template will scaffold the entire project structure. Here's a brief overview of each template:
4345

44-
* **`discord-bot`**: Sets up a basic Discord bot project with necessary `discord.js` dependencies and a starting `src/index.js`. Ideal for quickly getting a Discord bot development environment ready.
45-
* **`nextjs`**: Configures a minimal Next.js application, including React, Next.js dependencies, and standard Next.js scripts (`dev`, `build`, `start`, `lint`). Perfect for starting server-rendered React applications.
46-
* **`node-api`**: Provides a simple Node.js API structure, typically using Express. Includes basic routing and server setup. Great for backend development.
47-
* **`react-app`**: Initializes a basic React application using Vite for fast development. Includes core React dependencies and a simple component structure.
48-
* **`vite`**: Sets up a general-purpose Vite project. Vite is a fast build tool that provides a lean and efficient development experience.
49-
* **`vuejs`**: Configures a Vue.js project, often integrated with Vite for rapid development. Includes core Vue dependencies and a basic application structure.
50-
* **`webpack`**: Provides a foundational Webpack project setup. Useful for understanding and customizing build processes from scratch.
46+
- **`discord-bot`**: Sets up a basic Discord bot project with necessary `discord.js` dependencies and a starting `src/index.js`. Ideal for quickly getting a Discord bot development environment ready.
47+
- **`nextjs`**: Configures a minimal Next.js application, including React, Next.js dependencies, and standard Next.js scripts (`dev`, `build`, `start`, `lint`). Perfect for starting server-rendered React applications.
48+
- **`node-api`**: Provides a simple Node.js API structure, typically using Express. Includes basic routing and server setup. Great for backend development.
49+
- **`react-app`**: Initializes a basic React application using Vite for fast development. Includes core React dependencies and a simple component structure.
50+
- **`vite`**: Sets up a general-purpose Vite project. Vite is a fast build tool that provides a lean and efficient development experience.
51+
- **`vuejs`**: Configures a Vue.js project, often integrated with Vite for rapid development. Includes core Vue dependencies and a basic application structure.
52+
- **`webpack`**: Provides a foundational Webpack project setup. Useful for understanding and customizing build processes from scratch.
5153

5254
### 3. Additional Dependency Installation
5355

54-
You can select any *additional* npm packages you want to install beyond those provided by the chosen template. Template-specific dependencies (both regular and dev dependencies) will be automatically installed as part of the template application process.
56+
You can select any _additional_ npm packages you want to install beyond those provided by the chosen template. Template-specific dependencies (both regular and dev dependencies) will be automatically installed as part of the template application process.
5557

5658
**Example:**
5759

@@ -92,12 +94,12 @@ Confirm if you want to generate an `INSTRUCTIONS.md` file within your new projec
9294

9395
After successfully running `create-wizard`, your new project directory (`my-awesome-project` in the example above) will contain:
9496

95-
* **`package.json`**: Fully configured with the project name, merged dependencies (from both template and your selections), and template-defined npm scripts.
96-
* **`node_modules/`**: Contains all installed npm dependencies.
97-
* **Template-specific files and folders**: The complete file structure provided by the chosen template (e.g., `src/`, `public/`, configuration files).
98-
* **`INSTRUCTIONS.md`** (if generated): A markdown file with quick setup and usage instructions.
99-
* **`README.md`**: A comprehensive `README.md` file for your new project, including project overview, setup, usage, and contribution guidelines.
100-
* **`.git/`** (if Git initialization was selected): The Git repository.
97+
- **`package.json`**: Fully configured with the project name, merged dependencies (from both template and your selections), and template-defined npm scripts.
98+
- **`node_modules/`**: Contains all installed npm dependencies.
99+
- **Template-specific files and folders**: The complete file structure provided by the chosen template (e.g., `src/`, `public/`, configuration files).
100+
- **`INSTRUCTIONS.md`** (if generated): A markdown file with quick setup and usage instructions.
101+
- **`README.md`**: A comprehensive `README.md` file for your new project, including project overview, setup, usage, and contribution guidelines.
102+
- **`.git/`** (if Git initialization was selected): The Git repository.
101103

102104
## Example Workflow
103105

@@ -124,4 +126,4 @@ cd my-react-app
124126

125127
# Start developing!
126128
npm run dev
127-
```
129+
```
Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
# Contributing to @involvex/create-universe
1+
<!-- @format -->
22

3-
We welcome contributions to the `@involvex/create-universe` project! By contributing, you help us make this CLI tool even better for the community.
3+
# Contributing to @involvex/create-wizard
4+
5+
We welcome contributions to the `@involvex/create-wizard` project! By contributing, you help us make this CLI tool even better for the community.
46

57
## How to Contribute
68

79
### Reporting Bugs
810

911
If you find a bug, please open an issue on our GitHub repository. When reporting a bug, please include:
1012

11-
* A clear and concise description of the bug.
12-
* Steps to reproduce the behavior.
13-
* Expected behavior.
14-
* Actual behavior.
15-
* Screenshots or error messages (if applicable).
16-
* Your operating system, Node.js version, and `create-universe` version.
13+
- A clear and concise description of the bug.
14+
- Steps to reproduce the behavior.
15+
- Expected behavior.
16+
- Actual behavior.
17+
- Screenshots or error messages (if applicable).
18+
- Your operating system, Node.js version, and `create-universe` version.
1719

1820
### Suggesting Enhancements
1921

@@ -27,18 +29,21 @@ We encourage code contributions! If you'd like to submit code, please follow the
2729
Go to [https://github.com/involvex/create-universe]https://github.com/involvex/create-wizard and click the "Fork" button.
2830

2931
2. **Clone your forked repository**:
32+
3033
```bash
3134
git clone https://github.com/YOUR_USERNAME/create-universe.git
3235
cd create-universe
3336
```
3437

3538
3. **Install dependencies**:
39+
3640
```bash
3741
npm install
3842
```
3943

4044
4. **Create a new branch**:
4145
Choose a descriptive name for your branch (e.g., `feature/add-new-template`, `fix/bug-in-git-init`).
46+
4247
```bash
4348
git checkout -b feature/your-feature-name
4449
```
@@ -48,24 +53,29 @@ We encourage code contributions! If you'd like to submit code, please follow the
4853
4954
6. **Run tests**:
5055
Before committing, make sure all existing tests pass and add new tests for your changes if applicable.
56+
5157
```bash
5258
npm test
5359
```
5460
5561
7. **Lint and format your code**:
5662
Ensure your code is properly linted and formatted.
63+
5764
```bash
5865
npm run check
5966
```
6067
6168
8. **Commit your changes**:
6269
Write a clear and concise commit message. We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
70+
6371
```bash
6472
git commit -m "feat: add new template for XYZ"
6573
```
74+
6675
(Replace `feat` with `fix`, `docs`, `chore`, etc., as appropriate.)
6776
6877
9. **Push your branch**:
78+
6979
```bash
7080
git push origin feature/your-feature-name
7181
```
@@ -75,10 +85,10 @@ We encourage code contributions! If you'd like to submit code, please follow the
7585
7686
## Code Style and Conventions
7787
78-
* **Linting**: We use ESLint to enforce code quality. Please run `npm run lint` and `npm run lint:fix` before committing.
79-
* **Formatting**: We use Prettier for code formatting. Please run `npm run format` before committing.
80-
* **Commit Messages**: Follow the Conventional Commits specification.
88+
- **Linting**: We use ESLint to enforce code quality. Please run `npm run lint` and `npm run lint:fix` before committing.
89+
- **Formatting**: We use Prettier for code formatting. Please run `npm run format` before committing.
90+
- **Commit Messages**: Follow the Conventional Commits specification.
8191
8292
## License
8393
84-
By contributing to `@involvex/create-universe`, you agree that your contributions will be licensed under the project's MIT License.
94+
By contributing to `@involvex/create-wizard`, you agree that your contributions will be licensed under the project's MIT License.
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Installation Guide for @involvex/create-universe
1+
<!-- @format -->
22

3-
This document provides detailed instructions on how to install and set up the `@involvex/create-universe` CLI tool.
3+
# Installation Guide for @involvex/create-wizard
4+
5+
This document provides detailed instructions on how to install and set up the `@involvex/create-wizard` CLI tool.
46

57
## Prerequisites
68

79
Before you can install and use `create-universe`, you need to have Node.js installed on your system.
810

9-
* **Node.js**: Version 22.0.0 or higher is required. You can download it from the official Node.js website: [https://nodejs.org/](https://nodejs.org/)
11+
- **Node.js**: Version 22.0.0 or higher is required. You can download it from the official Node.js website: [https://nodejs.org/](https://nodejs.org/)
1012

1113
To verify your Node.js installation, open your terminal or command prompt and run:
1214

@@ -27,7 +29,7 @@ v22.x.x
2729
The recommended way to install `create-universe` is globally using npm (Node Package Manager). This makes the `create-universe` command available from any directory in your terminal.
2830

2931
```bash
30-
npm install -g @involvex/create-universe
32+
npm install -g @involvex/create-wizard
3133
```
3234

3335
After installation, you can verify that the CLI tool is correctly installed by running:
@@ -43,17 +45,20 @@ This should display the installed version of the `create-universe` tool.
4345
If you plan to contribute to the `create-universe` project or want to run it locally without global installation, follow these steps:
4446

4547
1. **Clone the repository**:
48+
4649
```bash
4750
git clone https://github.com/involvex/create-wizard.git
4851
cd create-universe
4952
```
5053

5154
2. **Install project dependencies**:
55+
5256
```bash
5357
npm install
5458
```
5559

5660
3. **Build the CLI tool**:
61+
5762
```bash
5863
npm run build
5964
```
@@ -70,11 +75,11 @@ If you plan to contribute to the `create-universe` project or want to run it loc
7075

7176
## Troubleshooting
7277

73-
* **`command not found: create-universe`**:
74-
* Ensure Node.js and npm are correctly installed and added to your system's PATH.
75-
* Try reinstalling globally: `npm install -g @involvex/create-universe`.
76-
* On some systems, you might need `sudo npm install -g @involvex/create-universe`.
77-
* **Permission errors during global installation**:
78-
* This often indicates that npm doesn't have write permissions to the global installation directory. You can either:
79-
* Use `sudo` (on macOS/Linux): `sudo npm install -g @involvex/create-wizard`.
80-
* Change npm's default directory: Refer to npm's official documentation on "Fixing npm permissions".
78+
- **`command not found: create-universe`**:
79+
- Ensure Node.js and npm are correctly installed and added to your system's PATH.
80+
- Try reinstalling globally: `npm install -g @involvex/create-wizard`.
81+
- On some systems, you might need `sudo npm install -g @involvex/create-wizard`.
82+
- **Permission errors during global installation**:
83+
- This often indicates that npm doesn't have write permissions to the global installation directory. You can either:
84+
- Use `sudo` (on macOS/Linux): `sudo npm install -g @involvex/create-wizard`.
85+
- Change npm's default directory: Refer to npm's official documentation on "Fixing npm permissions".

docs/docusaurus.config.js

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
// @ts-check
2+
// `@type` JSDoc annotations allow editor autocompletion and type checking
3+
// (when paired with `@ts-check`).
4+
// There are various equivalent ways to declare your Docusaurus config.
5+
// See https://docusaurus.io/docs/api/docusaurus-config/
6+
7+
import { themes as prismThemes } from 'prism-react-renderer';
8+
9+
/** @type {import('@docusaurus/types').Config} */
10+
const config = {
11+
title: '@involvex/create-wizard Documentation',
12+
tagline: 'Streamline your JavaScript project setup with ease.',
13+
favicon: 'img/favicon.ico',
14+
15+
// Set the production url of your site here
16+
url: 'https://involvex.github.io',
17+
// Set the /<baseUrl>/ pathname under which your site is served
18+
// For GitHub pages deployment, it is often '/<'projectName'>/'
19+
baseUrl: '/create-wizard/',
20+
21+
// GitHub pages deployment config.
22+
// If you aren't using GitHub pages, you don't need these.
23+
organizationName: 'involvex', // Usually your GitHub org/user name.
24+
projectName: 'create-wizard', // Usually your repo name.
25+
26+
onBrokenLinks: 'throw',
27+
onBrokenMarkdownLinks: 'warn',
28+
29+
// Even if you don't use internationalization, you can use this field to set
30+
// useful metadata like html lang. For example, if your site is Chinese, you
31+
// may want to replace "en" with "zh-Hans".
32+
i18n: {
33+
defaultLocale: 'en',
34+
locales: ['en'],
35+
},
36+
37+
presets: [
38+
[
39+
'classic',
40+
/** @type {import('@docusaurus/preset-classic').Options} */
41+
({
42+
docs: {
43+
sidebarPath: './sidebars.js',
44+
// Please change this to your repo.
45+
// Remove this to remove the "edit this page" links.
46+
editUrl:
47+
'https://github.com/involvex/create-wizard/tree/main/docs/',
48+
},
49+
blog: false, // Disable blog plugin
50+
theme: {
51+
customCss: './src/css/custom.css',
52+
},
53+
}),
54+
],
55+
],
56+
57+
themeConfig:
58+
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
59+
({
60+
// Replace with your project's social card
61+
image: 'img/docusaurus-social-card.jpg',
62+
navbar: {
63+
title: '@involvex/create-wizard',
64+
logo: {
65+
alt: 'My Project Logo',
66+
src: 'img/logo.svg', // You might want to create a custom logo
67+
},
68+
items: [
69+
{
70+
type: 'docSidebar',
71+
sidebarId: 'tutorialSidebar',
72+
position: 'left',
73+
label: 'Documentation',
74+
},
75+
{
76+
href: 'https://github.com/involvex/create-wizard',
77+
label: 'GitHub',
78+
position: 'right',
79+
},
80+
],
81+
},
82+
footer: {
83+
style: 'dark',
84+
links: [
85+
{
86+
title: 'Docs',
87+
items: [
88+
{
89+
label: 'Installation',
90+
to: '/docs/installation',
91+
},
92+
{
93+
label: 'Usage',
94+
to: '/docs/usage',
95+
},
96+
{
97+
label: 'Contribution',
98+
to: '/docs/contribution',
99+
},
100+
],
101+
},
102+
{
103+
title: 'Community',
104+
items: [
105+
{
106+
label: 'Stack Overflow',
107+
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
108+
},
109+
{
110+
label: 'Discord',
111+
href: 'https://discordapp.com/invite/docusaurus',
112+
},
113+
{
114+
label: 'Twitter',
115+
href: 'https://twitter.com/docusaurus',
116+
},
117+
],
118+
},
119+
{
120+
title: 'More',
121+
items: [
122+
{
123+
label: 'GitHub',
124+
href: 'https://github.com/involvex/create-wizard',
125+
},
126+
],
127+
},
128+
],
129+
copyright: `Copyright © ${new Date().getFullYear()} Involvex. Built with Docusaurus.`,
130+
},
131+
prism: {
132+
theme: prismThemes.github,
133+
darkTheme: prismThemes.dracula,
134+
},
135+
algolia: {
136+
// The application ID provided by Algolia
137+
appId: 'YOUR_APP_ID', // Replace with your Algolia App ID
138+
// Public API key: it is safe to commit it
139+
apiKey: 'YOUR_SEARCH_API_KEY', // Replace with your Algolia Search API Key
140+
indexName: 'YOUR_INDEX_NAME', // Replace with your Algolia Index Name
141+
// Optional: path for search page that renders nothing at /search
142+
// searchPagePath: 'search',
143+
},
144+
}),
145+
};
146+
147+
export default config;

0 commit comments

Comments
 (0)