Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Added ComponentArchetype.js #427

Open
wants to merge 2 commits into
base: website
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 3 additions & 57 deletions docs/building-ui/archetypes/blank.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,9 @@ The `blank` archetype is a foundational starter project for webforJ applications

## Using the `blank` archetype

To create and scaffold a new `blank` project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the `archetype:generate` command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project.

<!-- vale off -->
<Tabs>
<TabItem value="bash" label="Bash/Zsh" default>
```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-blank \
-DgroupId=org.example \
-DarchetypeVersion=LATEST \
-DartifactId=my-app \
-Dversion=1.0-SNAPSHOT
```
</TabItem>
<TabItem value="powershell" label="PowerShell">
```powershell
mvn -B archetype:generate `
-DarchetypeGroupId="com.webforj" `
-DarchetypeArtifactId="webforj-archetype-blank" `
-DarchetypeVersion="LATEST" `
-DgroupId="org.example" `
-DartifactId="my-app" `
-Dversion="1.0-SNAPSHOT"
```
</TabItem>
<TabItem value="cmd" label="Command Prompt">
```
mvn -B archetype:generate ^
-DarchetypeGroupId=com.webforj ^
-DarchetypeArtifactId=webforj-archetype-blank ^
-DgroupId=org.example ^
-DarchetypeVersion=LATEST ^
-DartifactId=my-app ^
-Dversion=1.0-SNAPSHOT
```
</TabItem>
</Tabs>
<!-- vale on -->

| Argument | Explanation |
|----------------------|-----------------------------------------------------------------------------|
| `archetypeGroupId` | The group ID of the archetype is `com.webforj` for webforJ archetypes.|
| `archetypeArtifactId` | Specifies the name of the archetype to use. |
| `archetypeVersion` | Specifies the version of the archetype to use. This ensures that the generated project is compatible with a specific archetype version. Using LATEST selects the most recent version available.|
| `groupId` | Represents the namespace for the generated project. Typically structured like a Java package, such as `org.example` and is used to uniquely identify your organization or project domain.|
| `artifactId` | Specifies the name of the generated project. This will be the name of the resulting artifact and the project folder.|
| `version` | Defines the version of the generated project. A common convention is MAJOR.MINOR-SNAPSHOT, like `1.0-SNAPSHOT`, where SNAPSHOT denotes that the project is still in development.|


After running the command, Maven will generate the project files necessary to run the project.
<ComponentArchetype
project="blank"
/>

### Run the app

Expand Down
59 changes: 3 additions & 56 deletions docs/building-ui/archetypes/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,9 @@ This archetype creates a minimalistic app with a few components and some styling

## Using the `hello-world` archetype

To create and scaffold a new `hello-world` project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the `archetype:generate` command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project.

<!-- vale off -->
<Tabs>
<TabItem value="bash" label="Bash/Zsh" default>
```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-hello-world \
-DgroupId=org.example \
-DarchetypeVersion=LATEST \
-DartifactId=my-app \
-Dversion=1.0-SNAPSHOT
```
</TabItem>
<TabItem value="powershell" label="PowerShell">
```powershell
mvn -B archetype:generate `
-DarchetypeGroupId="com.webforj" `
-DarchetypeArtifactId="webforj-archetype-hello-world" `
-DarchetypeVersion="LATEST" `
-DgroupId="org.example" `
-DartifactId="my-app" `
-Dversion="1.0-SNAPSHOT"
```
</TabItem>
<TabItem value="cmd" label="Command Prompt">
```
mvn -B archetype:generate ^
-DarchetypeGroupId=com.webforj ^
-DarchetypeArtifactId=webforj-archetype-hello-world ^
-DgroupId=org.example ^
-DarchetypeVersion=LATEST ^
-DartifactId=my-app ^
-Dversion=1.0-SNAPSHOT
```
</TabItem>
</Tabs>
<!-- vale on -->

| Argument | Explanation |
|----------------------|-----------------------------------------------------------------------------|
| `archetypeGroupId` | The group ID of the archetype is `com.webforj` for webforJ archetypes.|
| `archetypeArtifactId` | Specifies the name of the archetype to use. |
| `archetypeVersion` | Specifies the version of the archetype to use. This ensures that the generated project is compatible with a specific archetype version. Using LATEST selects the most recent version available.|
| `groupId` | Represents the namespace for the generated project. Typically structured like a Java package, such as `org.example` and is used to uniquely identify your organization or project domain.|
| `artifactId` | Specifies the name of the generated project. This will be the name of the resulting artifact and the project folder.|
| `version` | Defines the version of the generated project. A common convention is MAJOR.MINOR-SNAPSHOT, like `1.0-SNAPSHOT`, where SNAPSHOT denotes that the project is still in development.|

After running the command, Maven will generate the project files necessary to run the project.
<ComponentArchetype
project="hello-world"
/>

### Run the app

Expand Down
59 changes: 3 additions & 56 deletions docs/building-ui/archetypes/sidemenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,62 +10,9 @@ For projects that need a structured navigation system, the `sidemenu` archetype

## Using the `sidemenu` archetype

To create and scaffold a new `sidemenu` project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the `archetype:generate` command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project.

<!-- vale off -->
<Tabs>
<TabItem value="bash" label="Bash/Zsh" default>
```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-sidemenu \
-DgroupId=org.example \
-DarchetypeVersion=LATEST \
-DartifactId=my-app \
-Dversion=1.0-SNAPSHOT
```
</TabItem>
<TabItem value="powershell" label="PowerShell">
```powershell
mvn -B archetype:generate `
-DarchetypeGroupId="com.webforj" `
-DarchetypeArtifactId="webforj-archetype-sidemenu" `
-DarchetypeVersion="LATEST" `
-DgroupId="org.example" `
-DartifactId="my-app" `
-Dversion="1.0-SNAPSHOT"
```
</TabItem>
<TabItem value="cmd" label="Command Prompt">
```
mvn -B archetype:generate ^
-DarchetypeGroupId=com.webforj ^
-DarchetypeArtifactId=webforj-archetype-sidemenu ^
-DgroupId=org.example ^
-DarchetypeVersion=LATEST ^
-DartifactId=my-app ^
-Dversion=1.0-SNAPSHOT
```
</TabItem>
</Tabs>
<!-- vale on -->

| Argument | Explanation |
|----------------------|-----------------------------------------------------------------------------|
| `archetypeGroupId` | The group ID of the archetype is `com.webforj` for webforJ archetypes.|
| `archetypeArtifactId` | Specifies the name of the archetype to use. |
| `archetypeVersion` | Specifies the version of the archetype to use. This ensures that the generated project is compatible with a specific archetype version. Using LATEST selects the most recent version available.|
| `groupId` | Represents the namespace for the generated project. Typically structured like a Java package, such as `org.example` and is used to uniquely identify your organization or project domain.|
| `artifactId` | Specifies the name of the generated project. This will be the name of the resulting artifact and the project folder.|
| `version` | Defines the version of the generated project. A common convention is MAJOR.MINOR-SNAPSHOT, like `1.0-SNAPSHOT`, where SNAPSHOT denotes that the project is still in development.|

After running the command, Maven will generate the project files necessary to run the project.
<ComponentArchetype
project="sidemenu"
/>

### Run the app

Expand Down
59 changes: 3 additions & 56 deletions docs/building-ui/archetypes/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,62 +9,9 @@ The `tabs` starting project generates an app with a simple tabbed interface. Ide

## Using the `tabs` archetype

To create and scaffold a new `tabs` project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the `archetype:generate` command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project.

<!-- vale off -->
<Tabs>
<TabItem value="bash" label="Bash/Zsh" default>
```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-tabs \
-DgroupId=org.example \
-DarchetypeVersion=LATEST \
-DartifactId=my-app \
-Dversion=1.0-SNAPSHOT
```
</TabItem>
<TabItem value="powershell" label="PowerShell">
```powershell
mvn -B archetype:generate `
-DarchetypeGroupId="com.webforj" `
-DarchetypeArtifactId="webforj-archetype-tabs" `
-DarchetypeVersion="LATEST" `
-DgroupId="org.example" `
-DartifactId="my-app" `
-Dversion="1.0-SNAPSHOT"
```
</TabItem>
<TabItem value="cmd" label="Command Prompt">
```
mvn -B archetype:generate ^
-DarchetypeGroupId=com.webforj ^
-DarchetypeArtifactId=webforj-archetype-tabs ^
-DgroupId=org.example ^
-DarchetypeVersion=LATEST ^
-DartifactId=my-app ^
-Dversion=1.0-SNAPSHOT
```
</TabItem>
</Tabs>
<!-- vale on -->

| Argument | Explanation |
|----------------------|-----------------------------------------------------------------------------|
| `archetypeGroupId` | The group ID of the archetype is `com.webforj` for webforJ archetypes.|
| `archetypeArtifactId` | Specifies the name of the archetype to use. |
| `archetypeVersion` | Specifies the version of the archetype to use. This ensures that the generated project is compatible with a specific archetype version. Using LATEST selects the most recent version available.|
| `groupId` | Represents the namespace for the generated project. Typically structured like a Java package, such as `org.example` and is used to uniquely identify your organization or project domain.|
| `artifactId` | Specifies the name of the generated project. This will be the name of the resulting artifact and the project folder.|
| `version` | Defines the version of the generated project. A common convention is MAJOR.MINOR-SNAPSHOT, like `1.0-SNAPSHOT`, where SNAPSHOT denotes that the project is still in development.|

After running the command, Maven will generate the project files necessary to run the project.
<ComponentArchetype
project="tabs"
/>

### Run the app

Expand Down
20 changes: 3 additions & 17 deletions docs/configuration/bbj-installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,10 @@ in the previous step.


### Using the starter project
To create and scaffold a new project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the archetype command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project. To proceed with the webforJ starter project, use the following command:

```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-bbj-hello-world \
-DgroupId=org.example \
-DartifactId=my-hello-world-app \
-Dversion=1.0-SNAPSHOT
```

After running the command, Maven will generate the project files necessary to run the starter project.
<ComponentArchetype
project="hello-world"
/>

### Launching the app

Expand Down
21 changes: 3 additions & 18 deletions docs/configuration/bbj-installation/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,24 +134,9 @@ Finally, click on the "Configure" button, which will open a new window. In this
## 4. Using the starter project
Once BBj and the required webforJ plugin are installed and configured, you can create a new, scaffolded project from the command line. This project comes with the necessary tools to run your first webforJ program.

To create and scaffold a new project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the archetype command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project. To proceed with the webforJ starter project, use the following command:

```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-bbj-hello-world \
-DgroupId=org.example \
-DartifactId=my-hello-world-app \
-Dversion=1.0-SNAPSHOT
```

After running the command, Maven will generate the project files necessary to run the starter project.
<ComponentArchetype
project="hello-world"
/>

## 5. Launching the app

Expand Down
61 changes: 3 additions & 58 deletions docs/introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,64 +17,9 @@ import DocCardList from '@theme/DocCardList';

## Using the `hello-world` archetype

To create and scaffold a new `hello-world` project, follow these steps:

1) **Navigate to the proper directory**:
Open a terminal and move to the folder where you want to create your new project.

2) **Run the `archetype:generate` command**:
Use the Maven command below, and customize the `groupId`, `artifactId`, and `version` as needed for your project.

<!-- vale off -->
<Tabs>
<TabItem value="bash" label="Bash/Zsh" default>
```bash
mvn -B archetype:generate \
-DarchetypeGroupId=com.webforj \
-DarchetypeArtifactId=webforj-archetype-hello-world \
-DgroupId=org.example \
-DarchetypeVersion=LATEST \
-DartifactId=my-hello-world-app \
-Dversion=1.0-SNAPSHOT
```
</TabItem>
<TabItem value="powershell" label="PowerShell">
```powershell
mvn -B archetype:generate `
-DarchetypeGroupId="com.webforj" `
-DarchetypeArtifactId="webforj-archetype-hello-world" `
-DarchetypeVersion="LATEST" `
-DgroupId="org.example" `
-DartifactId="my-hello-world-app" `
-Dversion="1.0-SNAPSHOT"
```
</TabItem>
<TabItem value="cmd" label="Command Prompt">
```
mvn -B archetype:generate ^
-DarchetypeGroupId=com.webforj ^
-DarchetypeArtifactId=webforj-archetype-hello-world ^
-DgroupId=org.example ^
-DarchetypeVersion=LATEST ^
-DartifactId=my-hello-world-app ^
-Dversion=1.0-SNAPSHOT
```
</TabItem>
</Tabs>
<!-- vale on -->

| Argument | Explanation |
|----------------------|-----------------------------------------------------------------------------|
| `archetypeGroupId` | The group ID of the archetype is `com.webforj` for webforJ archetypes.|
| `archetypeArtifactId` | Specifies the name of the archetype to use. |
| `archetypeVersion` | Specifies the version of the archetype to use. This ensures that the generated project is compatible with a specific archetype version. Using LATEST selects the most recent version available.|
| `groupId` | Represents the namespace for the generated project. Typically structured like a Java package, such as `org.example` and is used to uniquely identify your organization or project domain.|
| `artifactId` | Specifies the name of the generated project. This will be the name of the resulting artifact and the project folder.|
| `version` | Defines the version of the generated project. A common convention is MAJOR.MINOR-SNAPSHOT, like `1.0-SNAPSHOT`, where SNAPSHOT denotes that the project is still in development.|


After running the command, Maven will generate the project files necessary to run the project.

<ComponentArchetype
project="hello-world"
/>

:::tip
webforJ comes with several predefined archetypes that help you quickly start your webforJ development. To see a complete list of available archetypes, please refer to the [archetypes catalog](../building-ui/archetypes/overview).
Expand Down
Loading
Loading