This repository has been archived by the owner on May 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kaustav | #29 | Added documentations for cli commands. | TG-29
- Loading branch information
Showing
7 changed files
with
171 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
id: cli-command-generate | ||
title: rg generate | ||
--- | ||
|
||
Generates and/or modifies files based on a task. | ||
|
||
rg **generate** `<task>` `<name>` | ||
|
||
rg **g** `<task>` `<name>` | ||
|
||
## Description | ||
|
||
It generates the required element based on the task name. | ||
|
||
> Note that, for now we are only supporting **component** generating task. | ||
## Arguments | ||
|
||
Argument | Description | | ||
---------|----------| | ||
_task_ | The task or collection of tasks to generate. Check the [currently supported tasks](#task-commands). | | ||
|
||
--- | ||
|
||
## Task commands | ||
|
||
### Component | ||
|
||
rg generate **component** `<name>` | ||
|
||
rg g **component** `<name>` | ||
|
||
#### Description | ||
|
||
Creates a new generic component definition in the given or default project. | ||
|
||
The component will be created in the current working directory. | ||
|
||
#### Arguments | ||
|
||
Argument | Description | | ||
---------|----------| | ||
_name_ | The name of the component. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
id: cli-command-new | ||
title: rg new | ||
--- | ||
|
||
Creates a new workspace and an initial React App along with webpack bundled with it. | ||
|
||
rg **new** `<app_name>` | ||
|
||
## Description | ||
|
||
It creates and initializes a new React application that is a default project of the new workspace. | ||
|
||
Also it provides interactive prompts for the initial _(Optional)_ configuration, such as *Author Name*. All prompt can be allowed to default. | ||
|
||
* The workspace folder is given the specified project name and contain other configuration files on the same level. _(We are going to refer this as root)_ | ||
|
||
* By default the files which gets generates in the workspace directory can be found on [folder structure](./folder-structure-for-new-app.md). | ||
|
||
## Arguments | ||
|
||
Argument | Description | | ||
---------|----------| | ||
_name_ | The name of the new workspace and initial project. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,40 @@ | ||
const React = require('react') | ||
const React = require("react"); | ||
|
||
class Footer extends React.Component { | ||
copyrightSection = (copyright, author) => ( | ||
<section className="rg-copyright"> | ||
{copyright.prefix} | ||
<a className="rg-link" href={copyright.owner.link}> | ||
{copyright.owner.name} | ||
</a> | ||
. | ||
<span className="rg-author"> | ||
Authored by | ||
<a className="rg-link" href={author.link}> | ||
{author.name} | ||
</a> | ||
. | ||
</span> | ||
</section> | ||
); | ||
|
||
render() { | ||
const { copyright, license, author } = this.props.config; | ||
return ( | ||
<footer className="nav-footer rg-footer" id="footer"> | ||
<div className="footerContainer"> | ||
<section className="rg-copyright">{this.props.config.copyright}</section> | ||
{this.copyrightSection(copyright, author)} | ||
<section className="rg-license-container"> | ||
Code licensed under an | ||
<a className="rg-link" href={license.link}> | ||
{license.name} | ||
</a> | ||
License. | ||
</section> | ||
</div> | ||
</footer> | ||
) | ||
); | ||
} | ||
} | ||
|
||
module.exports = Footer | ||
module.exports = Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters