Deleting Files

With rhc you can delete what you already created with create commands.

The following points shows how to deal with deleting your files with the delete command.

Components

  1. To delete a component simply run:
rhc delete -c <component-name>
src/components/<component-name>/ does not exist
  1. To delete multiple components run:
rhc delete -c <component-name-1> <component-name-2> ...
  1. To delete one or multiple components that resides in a specific path under the src/components/ folder, you can run:
rhc delete -c <component-name-1> <component-name-2> ... -f <folder-path>

Pages

  1. To delete a page simply run:
rhc delete -p <page-name>
src/pages/<page-name>/ does not exist
  1. To delete multiple pages run:
rhc delete -p <page-name-1> <page-name-2> ...
  1. To delete one or multiple pages that resides in a specific path under the src/pages/ folder, you can run:
rhc delete -p <page-name-1> <page-name-2> ... -f <folder-path>

Redux

rhc delete -r
src/redux/ does not exist

1 - To delete a reducer run:

rhc delete --reducer <reducer-name>
./src/redux/reducers/<reducer-name>/ does not exist

2 - You can even delete multiple reducers at once:

rhc delete --reducer <reducer-name-1> <reducer-name-2> ...

3 - To delete all reducers run:

rhc delete --reducer

1 - To delete an action run:

rhc delete --action <reducer-name> <action-name>
./src/redux/actions/<reducer-name>/ does not exist

2 - You can even delete multiple actions for a specific reducer at once:

rhc delete --action <reducer-name> <action-name-1> <action-name-2> ...

3 - To delete all actions for a specific reducer run:

rhc delete --action <reducer-name>

Configuration

rhc delete --config
rhc.config.json does not exist