5

I was trying to figure out the way i can change the default tab indent size of my TS files generated by Ionic CLI

Whenever i run ionic generate command it creates the file with tab indention of 2 spaces

How can i make it to default 4?

sebaferreras
  • 44,206
  • 11
  • 116
  • 134
powercoder23
  • 1,404
  • 1
  • 13
  • 22

1 Answers1

2

I don't think that this is possible to configure within the ionic-cli. But it's easy to change the defaults for .ts files in your text editor/IDE.

Usually there is an .editorconfig file (in the root of the project) for this. Read more about here.

Christian Benseler
  • 7,907
  • 8
  • 40
  • 71
  • But still, the `ionic generate` command will create the file with tab indention of 2 spaces :/ – sebaferreras Jun 26 '17 at 18:37
  • does .editorconfig file has to do something with the 'ionic generate'?, i don't think so.. – powercoder23 Jun 26 '17 at 19:05
  • @powercoder23 I didn't say that .editorconfig changes the way ionic generator behaves. What I meant is that .editorconfig can set this settings for the developer (and other team members) when they open/edit files. It's kind of a "workaround" as long as neither ionic-clic nor even angular-cli has this option. – Christian Benseler Jun 26 '17 at 19:20