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

Change default component extension

Open tim-phillips opened this issue 7 years ago • 2 comments

It appears the .jsx extension is hard coded in:

https://github.com/mantrajs/mantra-cli/blob/255405efd4a680498b2e03df16fdb82b7bb165fb/lib/generators/utils.js#L26

Are there any plans to enable the user to generate components with a .js extension, like in the mantra sample blog app?

tim-phillips avatar Oct 20 '16 01:10 tim-phillips

Yeah. this is doable. Here is how we are getting the extensions currently.

We can make a function that takes user config (read from mantra-cli.yml) and entity type (action, components, etc.) and conditionally outputs extensions. PR is welcomed.

sungwoncho avatar Oct 21 '16 03:10 sungwoncho

Great! I'll take a crack at it. I'll let you know here if I have any questions.

tim-phillips avatar Oct 27 '16 03:10 tim-phillips