Sha256: dd599544b6647d97069d08eb4bc924649db848d5848dc11da624cae2d80f333a

Contents?: true

Size: 1.69 KB

Versions: 8

Compression:

Stored size: 1.69 KB

Contents

<!--
# @title CLI: discorb new
-->

# discorb new

This command will create a new project in the directory.

## Usage

```bash
discorb new [options] [dir]
```

## Options

### `dir`

The directory to create the project in.
Defaults to the current directory.
If the directory exists and is not empty, an error is returned.
You can use `--force` to overwrite an existing directory.

### `--[no-]bundle`

Whether to use bundle.
If true, the command will create Gemfile and execute `bundle install`.
Default to true.

### `--[no-]git`

Whether to initialize git.
If true, the command will initialize git and commit the initial files with commit message `Initial commit`.
Use `git commit --amend -m "..."` to change the commit message.
Default to false.

### `--[no-]desc`

Whether to create a description file.
If true, the command will create a `.env.sample` and `README.md` file.
Default to false.

### `-n` `--name`

The name of the project.
It will be used in the `README.md` file.
Default to the directory name.

### `-t`, `--token`

The name of token environment variable.
Default to TOKEN.

### `-f`, `--force`

Whether to overwrite an existing directory.
Default to false.

## File structure

The following files will be created:

| File | Description |
| ---- | ----------- |
| `.env` | Environment variables. |
| `main.rb` | Main script. |
| `.gitignore` | Git ignore file. Won't be created if `--git` is false. |
| `Gemfile` | Gemfile. Won't be created if `--bundle` is false. |
| `Gemfile.lock` | Gemfile lock file. Won't be created if `--bundle` is false. |
| `README.md` | Readme file. Won't be created if `--desc` is false. |
| `.env.sample` | Sample environment variables. Won't be created if `--desc` is false. |

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
discorb-0.16.0 docs/cli/new.md
discorb-0.15.1 docs/cli/new.md
discorb-0.15.0 docs/cli/new.md
discorb-0.14.0 docs/cli/new.md
discorb-0.13.4 docs/cli/new.md
discorb-0.13.3 docs/cli/new.md
discorb-0.13.2 docs/cli/new.md
discorb-0.13.1 docs/cli/new.md