New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to AngularCli and remove all Webpack functions #5661
Conversation
You can use my sample app for tests : https://github.com/stevehouel/jhipster-angularcli-app I removed all webpack configuration and dependencies and switch fully on angularly. I added also dedicated environment files for prod and dev configuration Fix jhipster#5624
AngularCli already use posts loader in his webpack configuration so we can still use it
This would need lot if testing. Im yet to review it in detail but at first look seems like fww things are missing.
|
Sure this will need some tests but for what you say:
- sass is already embedded
- static ressources are copied
- separate dev and vendor should be check on angularcli and bench
performance on serve
- i will have a look for browsersync
Le mar. 25 avr. 2017 à 23:18, Deepu K Sasidharan <notifications@github.com>
a écrit :
… This would need lot if testing. Im yet to review it in detail but at first
look seems like fww things are missing.
- Browsersync - this is very important in our workflow. Just having
live reload wont be enough
- Sass -unless its automatically handled
- Notification
- we had vendor and dev built separate to improve serve performance
and to avoid building the heavy vendor part each time
- copying static assets and swagger stuff
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5661 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARWTraOq1jbrpCdlJDZv8FRTxgU0Vbnwks5rzmMpgaJpZM4NIBCl>
.
|
@deepu105 I found a way to use Browsersync by using lite-server. So one problem solved, I will commit it ASAP. Regarding other points, I have checked and AngularCli already separated vendor and app build so this is fast when changes are made. |
Ok ill test it later
…On Wed, 26 Apr 2017, 11:58 am Steve HOUEL, ***@***.***> wrote:
@deepu105 <https://github.com/deepu105> I found a way to use Browsersync
by using lite-server. So one problem solved, I will commit it ASAP.
Regarding other points, I have checked and AngularCli already separated
vendor and app build so this is fast when changes are made.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5661 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDlFxH4tQS3PwTrNPSG09GCtPsRLViwks5rzxUogaJpZM4NIBCl>
.
|
The build is all red, and indeed there's a lot to do (and test) here, but for me this would be a much better solution than what we currently do. Big +1 then! |
I am working on it @jdubois :)
Le jeu. 27 avr. 2017 à 09:13, Julien Dubois <notifications@github.com> a
écrit :
… The build is all red, and indeed there's a lot to do (and test) here, but
for me this would be a much better solution than what we currently do. Big
+1 then!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5661 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARWTrRJceVbliy0BPVij10uCmBQ9grRWks5r0EAUgaJpZM4NIBCl>
.
|
I have done the upgrade for adding browsersync, but there is currently a issue on angular-cli with option --watch on build which is doing an infinite loop and not detecting change anymore, so I will wait for an answer on my issue before commit |
@jdubois I guess that your Travis is incorrect everything looks good into logs and all tests passed, but still in error :( |
@stevehouel : something is strange in Travis build, as it is stuck after the
|
Yes @pascalgrimaud I saw it, I am currently checking why ng test is not responding after success |
Also reduce test execution to a single shot
@jhipster/developers @stevehouel there are few things we have to consider here before we decide on this so I would like to call for a vote from the core team I'll list some pros and cons of this approach IMO, @stevehouel of course you can add more if you think of any or correct me if Im wrong Pros
Cons
|
I think about the consistency with the current project with ReactJS, which uses Webpack too. It will be like Grunt and Gulp, in the past |
First of all, concerning "JHipster React": there is a very high probability we do this. I have a very good client who would be ready to sponsor this, and that would be really awesome. However, I can't guarantee anything yet, and I don't know yet how this will work out technically. Then there are 3 very important points for me:
I'm seeing this like I see Spring Boot: in the early days JHipster was using Spring directly (that was before Spring Boot existed), and migrating to Spring Boot as removed a lot of headaches for us. And in return, this allowed us to concentrate on more value-added features, like microservices. Now that looks like I'm a big fan of Angular CLI, but let me be very clear: @deepu105 @sendilkumarn @wmarques all know Angular much better than I do, so they will have the final word on this, of course. |
@stevehouel I tested this there are some issues I noticed
|
Btw jhipster-react will not be an issue as it wont have any code shared with ng2 so that need to be taken into account here |
|
Copy swagger and shim static files when building app Revert and remove browsersync till angular-cli issue is not fix Move target to www
… into angularcli # Conflicts: # generators/client/templates/angular/src/test/javascript/_protractor.conf.js
So @deepu105, I fix all your issues. I added swagger and shim static files on build and change the target directory to www and not www/app. |
@stevehouel thanks I will test again today
|
Ok @deepu105 I forgot some case on my tests. I was always using the serve stuff. My bad |
… into angularcli # Conflicts: # generators/client/templates/angular/_package.json # generators/client/templates/angular/webpack/_webpack.common.js
… into angularcli # Conflicts: # generators/client/templates/angular/_package.json # generators/client/templates/angular/src/main/webapp/app/_app.constants.ts # generators/client/templates/angular/webpack/_webpack.common.js # generators/client/templates/angular/webpack/_webpack.dev.js # generators/client/templates/angular/webpack/_webpack.prod.js # generators/client/templates/angular/webpack/_webpack.vendor.js
I'm sorry I had no time to test. |
@jdubois I know 👍 |
I will have a look 👍 |
Great work @stevehouel
Note: we will be missing webpack more, since for every customisation in the build we have to look forward angular cli to add this and I guess that is the main reason why This will reduce our work on one hand but make ourselves depend on angular-cli much more on the other. |
Thx @sendilkumarn.
I understand why webpack is better in a lot of case. Maybe we should add an option for this ? and let the user choose between an optimize version using webpack or an easy integration (but lower perf) using angular-cli. There is not a lot of work to do for be able to switch between both. |
If we add an option here to choose between one way is to
|
Yes thats the exact reason why we removed Grunt. There is no value in maintaining 2 versions of same thing (Technically angular cli is just webpack stuff underneath) |
Ok I understand @deepu105 and I agree about having two configuration is not a good option. So maybe what I can do is fix all angular-cli issues on current Master and then be able to remove the ejected option to be fully compatible with both webpack and angular-cli config. But webpack will still be the default option we provide for build/test/package. |
Sounds good
…On Tue, 16 May 2017, 8:35 am Steve HOUEL, ***@***.***> wrote:
Ok I understand @deepu105 <https://github.com/deepu105> and I agree about
having two configuration is not a good option. So maybe what I can do is
fix all angular-cli issues on current Master and then be able to remove the
ejected option to be fully compatible with both webpack and angular-cli
config. But webpack will still be the default option we provide for
build/test/package.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5661 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDlF-bW-SkqJvnC8ksrJ0L_QlXs3N4Fks5r6UPCgaJpZM4NIBCl>
.
|
If everyone agree my previous proposal, I think you can close this PR. I will create a new one to do that work |
Thats awesome we do that. |
let me close this then. |
You can use my sample app for tests : https://github.com/stevehouel/jhipster-angularcli-app
I removed all webpack configuration and dependencies and switch fully on angularly. I added also dedicated environment files for prod and dev configuration
Fix #5624
Please make sure the below checklist is followed for Pull Requests.
Travis tests are green
Tests are added where necessary
Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed