Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uteamjs/uteam-cli

uteam-cli for uteam-react code automation
https://github.com/uteamjs/uteam-cli

cli nodejs react redux yaml

Last synced: 3 months ago
JSON representation

uteam-cli for uteam-react code automation

Awesome Lists containing this project

README

        

The [uteam CLI](https://u.team/document/cli) **Command Line Interface** is to help developers to automate the creation and deletion **React-Redux** & **Node.js** application modules and packages.

The application are base on the [@uteamjs/react](https://u.team/document/uteam-react/overview) frontend and [@uteamjs/node](https://u.team/document/uteam-node/overview) backend framework.

**uteam CLI** [generate](https://u.team/document/yaml/overview#uteam) standard JSX Code from [YAML](https://u.team/document/yaml/appyaml) definition.
# Installation
```
$ npm install -g uteam
```

# Command
[uteam CLI](https://u.team/document/cli) allows you to execute **command** with different **options** as parameters
```
$ uteam [--options …]
```
## Help
```
$ uteam [help]
```
The screen shows the following message:
```
uteam - CLI

Create and generate @uteamjs applications from YAML definition.
Copyright © 2021 U Team, Inc.
Please visit https://u.team for details.

Usage

$ uteam [-- [string]]

create Create Application or Packages
remove Remove Packages
generate Generate React application from YAML
template Template --update to latest version

-a, --application string Application to be generated.

-p, --packages string[] Package added to application.

-g, --generate string Generate code after adding packages.

-t, --template string Tempalate used to create applications or packages.

Default @uteamjs/template/react-application

-h, --help Display this usage guide.

-y, --yaml string YAML definition file, default app.yaml.

--component string Component template

--initComponent string Init template

--exportComponent string Export template

--indexfile string Index File template

--update string Upate template name

Examples

1. Create application $ uteam create --application my-cms
2. Create packages $ cd ...your/application
$ uteam create --package my-package package2
3. Generate application $ uteam generate
- with specified yaml file $ uteam generate --yaml myApp
```
> ### Options
>
> The options are in form of --name \
> or -n \ where -n is the short form of --name
## Create
Create an application and/or packages with yaml code generation.
```
$ uteam create < --application | --packages … >
[--generate]
```

- **--application**: Create [@uteamjs/react](https://u.team/document/uteam-react/overview) application with \. Application is created from [@uteamjs/template](https://u.team/document/template)/**react-application** by default.
- **--packages [ …]**: Create packages under \ with \, \ ...
- **--generate**: Automatically run **uteam generate** after each package created.
## Create with template
Create either application or packages from template \
```
$ uteam create < --application | --packages > [--template ]
```
- **--template \**: The system will search from the user specified template first. If not found, it will use the [@uteamjs/template](https://u.team/document/template)/\
## Remove
Remove packages from applications.
```
$ uteam remove [--packages …]
```
ONLY **--packages** option is allowed. If you want to remove the application, just delete the application folder from the file system.
## Generate
Generate complete **React JSX** packages from YAML. The generation options are defined in the header section of the [YAML](https://u.team/document/yaml/appyaml) file. Run the following command under each package folder.
```
$ uteam generate [--yaml ]
```
- **--yaml \**: The YAML file used for code generation.
# Template
Since [@uteamjs/template](https://u.team/document/template) is installed under the uteam global location, it is hard to navigate to the installed folder to run npm to update the template. **uteam** provides the following command to update the template to the latest version.
```
$ uteam template --update
```
# License
[MIT](LICENSE) - **uteam** installed locally for the create, update and delete of application and packages.

SasS - The Code Generation is a provided by the **cli.u.team** platform.