Generator-jhipster: Suffixing template files to .ejs

Created on 20 Feb 2018  Â·  6Comments  Â·  Source: jhipster/generator-jhipster

Overview of the issue

generator-jhipster template files are suffixed by their target extensions (ts, html, scss, ...).
And some IDE recognize the files by their extension: for example, enabling typescript syntax hightlighting and refactoring because the suffix of the file.
Some IDE have some ejs support, but only for files that are suffixed by .ejs (I'm thinking of Intellij, but there are may be other).
It could be nice to benefit from that capacity to contribute to jhipster faster.

Motivation for or Use Case

More productivity, syntax highlighting, renaming and so on...

Reproduce the error

Install the Idea ejs plugin and open a generator-jhipster .ts template => everything is red. rename that file suffixing it by ejs (xxx.ts.ejs), and you've nice syntax highligthing on templates o/

Related issues

maybe linting

Suggest a Fix

suffixing every template file by .ejs (and updating their reference), finding a good extension suffix (pre-ejs) for ejs helpers.

JHipster Version(s)

4.14.0

JHipster configuration

The impact happens before generating the code!

Entity configuration(s) entityName.json files generated in the .jhipster directory

N/A

Browsers and Operating System

Intellij Idea ultimate (from what I know)

  • [x ] Checking this box is mandatory (this is just to show you read everything)

Most helpful comment

This is something I wanted to do as well. For the most complex subs we use
our own file processing methods so it would be easy to do it. Let me do the
generic conversion first, then someone can do it for the sub generators
that dont use our file processing

On 21 Feb 2018 12:25 am, "Gaël Marziou" notifications@github.com wrote:

Good idea, this is really painful especially since VS Code 1.20 which now
shows files with errors or warnings in the File Explorer:
https://code.visualstudio.com/updates/v1_20#_error-
indicators-in-the-explorer

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7147#issuecomment-367157329,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1CM1N0cEQJIN4k24CzBq78SAha4ks5tW1R7gaJpZM4SMymy
.

All 6 comments

Good idea, this is really painful especially since VS Code 1.20 which now shows files with errors or warnings in the File Explorer: https://code.visualstudio.com/updates/v1_20#_error-indicators-in-the-explorer

This is something I wanted to do as well. For the most complex subs we use
our own file processing methods so it would be easy to do it. Let me do the
generic conversion first, then someone can do it for the sub generators
that dont use our file processing

On 21 Feb 2018 12:25 am, "Gaël Marziou" notifications@github.com wrote:

Good idea, this is really painful especially since VS Code 1.20 which now
shows files with errors or warnings in the File Explorer:
https://code.visualstudio.com/updates/v1_20#_error-
indicators-in-the-explorer

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7147#issuecomment-367157329,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1CM1N0cEQJIN4k24CzBq78SAha4ks5tW1R7gaJpZM4SMymy
.

Btw we already lint ejs. And there is an ejs plugin for vscode as well

On 21 Feb 2018 9:00 am, "Deepu K Sasidharan" d4udts@gmail.com wrote:

This is something I wanted to do as well. For the most complex subs we use
our own file processing methods so it would be easy to do it. Let me do the
generic conversion first, then someone can do it for the sub generators
that dont use our file processing

On 21 Feb 2018 12:25 am, "Gaël Marziou" notifications@github.com wrote:

Good idea, this is really painful especially since VS Code 1.20 which now
shows files with errors or warnings in the File Explorer:
https://code.visualstudio.com/updates/v1_20#_error-indicator
s-in-the-explorer

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/7147#issuecomment-367157329,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF1CM1N0cEQJIN4k24CzBq78SAha4ks5tW1R7gaJpZM4SMymy
.

ejslint does not work work every cases: I experimented it forgetting a %> by mistake. I'll try to reproduce then post a bug in their repo

@Tcharl take a look, the conversion is done

@Tcharl I think ejslint only works with files having ejs extension. I tried in the new code and seems to work

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edvjacek picture edvjacek  Â·  3Comments

sdoxsee picture sdoxsee  Â·  4Comments

marcelinobadin picture marcelinobadin  Â·  3Comments

kaidohallik picture kaidohallik  Â·  3Comments

DanielFran picture DanielFran  Â·  3Comments