The Gulp that is used for development (reloads browser on file change) is changing the index.html (injecting the js files). The problem is the files are injected in different order every time, so even when there is no actual change, the index.html is marked by VCS as modified.
This leads to messing up the versioning (e.g. I want to find a commit with an important change in this file and it is shown in every commit that involved change of angular .js files).
3.1.0
.yo-rc.json file generated in the root folder{
"generator-jhipster": {
"jhipsterVersion": "3.1.0",
...
"serverPort": "8080",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"buildTool": "maven",
"enableSocialSignIn": true,
"rememberMeKey": "8dab5f27baaec77194f7d482be9866580412018c",
"useSass": true,
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"cs"
]
}
}
Windows 7, Opera, Chrome
Run jhipster app, run gulp, change an Angular controller (e.g. home.state.js).
Ensure the order of injected files; inject only missing ones...
Yes it seems to be the current behaviour. I think we need to open an issue
to angular file sort plugin
Thanks & Regards,
Deepu
On Sat, Apr 30, 2016 at 10:03 PM, WhyINeedToFillUsername <
[email protected]> wrote:
_Overview of the issue_
The Gulp that is used for development (reloads browser on file change) is
changing the index.html (injecting the js files). The problem is the files
are injected in different order every time, so even when there is no actual
change, the index.html is marked by VCS as modified.This leads to messing up the versioning (e.g. I want to find a commit with
an important change in this file and it is shown in every commit that
involved change of angular .js files).
_JHipster Version(s)_3.1.0
_JHipster configuration, a .yo-rc.json file generated in the root folder_{
"generator-jhipster": {
"jhipsterVersion": "3.1.0",
...
"serverPort": "8080",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"buildTool": "maven",
"enableSocialSignIn": true,
"rememberMeKey": "8dab5f27baaec77194f7d482be9866580412018c",
"useSass": true,
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"cs"
]
}
}_Browsers and Operating System_
Windows 7, Opera, Chrome
_Reproduce the error_Run jhipster app, run gulp, change an Angular controller (e.g.
home.state.js).
_Suggest a Fix_Ensure the order of injected files; inject only missing ones...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3499
Ok, thanks :)
They seem to have found how to fix it by using gulp-natural-sort : https://github.com/klei/gulp-angular-filesort/issues/17#issuecomment-69228964
I can PR this if this solution is ok for you
Gulp natural sort has only got 12 stars... Is that really a random order?
Its a very simple plugin (few lines of code), which has a very specific use
case so I wouldn't mind using it even if stars are less as it would solve
the issue for us. But we can first check if there is a more popular
alternative first.
On 2 May 2016 23:03, "Julien Dubois" [email protected] wrote:
Gulp natural sort https://github.com/emgeee/gulp-natural-sort has only
got 12 stars... Is that really a random order?—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3499#issuecomment-216261047
OK, but is this really random, like every time you have something else generated?
Otherwise OK for me, let's not lose too much time here
Its random for files which has same level of dependency so yes its
irritating for the version control. So IMO we should do this, and if you
are ok I'll do il this tomorrow
On 3 May 2016 00:16, "Julien Dubois" [email protected] wrote:
OK, but is this really random, like every time you have something else
generated?
Otherwise OK for me, let's not lose too much time here—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/3499#issuecomment-216280914
Most helpful comment
Its random for files which has same level of dependency so yes its
irritating for the version control. So IMO we should do this, and if you
are ok I'll do il this tomorrow
On 3 May 2016 00:16, "Julien Dubois" [email protected] wrote: