angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Rename / remove / move components

Open zpydee opened this issue 10 years ago • 102 comments

Please provide us with the following information:

  1. OS? Mac OSX (El Capitan)
  1. Versions. Please run ng --version. If there's nothing outputted, please angular-cli: 1.0.0-beta.1 node: 5.7.0 os: darwin x64

It would be really usefull to add cli commands for:

  • rm = removing a component
  • mv = moving / renaming a component

Unless I am missing it, I don't see that this exists and it would be really useful during refactoring to avoid all the manual updates that come with this process.

Thoughts?

zpydee avatar May 24 '16 07:05 zpydee

+1 for renaming and removing component

luisandia avatar Aug 15 '17 23:08 luisandia

+1 for renaming and removing component

khalidriaz avatar Aug 23 '17 13:08 khalidriaz

+1 for renaming

mjunior avatar Aug 23 '17 19:08 mjunior

+1 for renaming and removing ... Even if a Rename meant to delete and recreate, I'm down. I usually generate a new component, and copy the old code over.

rlingineni avatar Aug 25 '17 14:08 rlingineni

1+ renaming and removing. Any document of proper way for renaming and removing for now?

wcpmahmudul avatar Aug 26 '17 07:08 wcpmahmudul

+1 for renaming

abhijeet2083 avatar Aug 28 '17 20:08 abhijeet2083

I'm so in need of this feature that i made my own (Pending the official version).

It's far from perfect and assumes that "app.module.ts"'s shape have not been too much messed up manually (that's why it's not in a repo), but it helps.

angular-4-custom-cli.zip unzip a the root of your project (same folder where you use ng ... ).

How to use:

remove: node remove_component OldNameComponent

rename: node rename_component OldNameComponent NewNameComponent

yorgsite avatar Aug 30 '17 10:08 yorgsite

+1

mnlfischer avatar Sep 04 '17 09:09 mnlfischer

Wow if I didn't have to rename components after refactoring that would be so awesome. +1

BenRacicot avatar Sep 18 '17 23:09 BenRacicot

+1

mlamothe avatar Sep 21 '17 02:09 mlamothe

I’m going to mute this because I’m tired of getting +1 emails. I raised this issue a long time ago but I don’t think it’s a priority to the core team.

leehericks avatar Sep 21 '17 03:09 leehericks

+2

I would like to see ng destroy component myComponent and ng rename component myComponent newComponentName

httpJunkie avatar Sep 23 '17 08:09 httpJunkie

+1

I'd love to be able to quickly rename or remove a module using angular-cli.

Programazing avatar Sep 29 '17 19:09 Programazing

It will be much more easier and handy to use CLI for R/M/D components and services

mbougarne avatar Oct 01 '17 11:10 mbougarne

+1

john-md86 avatar Oct 06 '17 17:10 john-md86

+1

danelse avatar Oct 09 '17 13:10 danelse

+1

mairouche avatar Oct 10 '17 13:10 mairouche

+1 and unsubscribe!

unit-cesar avatar Oct 19 '17 03:10 unit-cesar

+1

oliveirabc avatar Oct 30 '17 17:10 oliveirabc

+1

jkatnik avatar Nov 03 '17 19:11 jkatnik