Skip to content

Commit

Permalink
chore: Added tab for archetype command in PowerShell (#417)
Browse files Browse the repository at this point in the history
* chore: Added tab for archetype command in PowerShell
- Added `powershell` as an additional language
- Added `Tabs` and `TabItem` to global imports

* chore: Added CMD Tab for `archetype:generate`

* move `-B` to start

---------

Co-authored-by: Hyyan Abo Fakher <[email protected]>
  • Loading branch information
bbrennanbasis and hyyan authored Jan 23, 2025
1 parent 17c5da0 commit 87546dd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 10 deletions.
46 changes: 37 additions & 9 deletions docs/introduction/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,43 @@ 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.

```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
```
<!-- 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 |
|----------------------|-----------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const config = {
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['java', 'Ini', 'bash']
additionalLanguages: ['java', 'Ini', 'bash', 'powershell']
},
}
};
Expand Down
4 changes: 4 additions & 0 deletions src/theme/MDXComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import ParentLink from '@site/src/components/DocsTools/ParentLink';
import TableBuilder from '@site/src/components/DocsTools/TableBuilder';
import TabSwitcher from '@site/src/components/DocsTools/TabSwitcher';
import DocCardList from '@theme/DocCardList';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


export default {
Expand All @@ -26,5 +28,7 @@ export default {
ParentLink,
TableBuilder,
TabSwitcher,
Tabs,
TabItem,
};

0 comments on commit 87546dd

Please sign in to comment.