-
Notifications
You must be signed in to change notification settings - Fork 81
Bug fixes and AOT compatibility / support #72
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
Conversation
If somebody wants to try AOT compatible version of this library you can get one installing the library with npm from: git://github.com/zefoy/angular2-color-picker.git#npm-package |
@Alberplz I fixed this PR so that it does not conflict anymore, here are the changes that are include in this PR:
Let me know if you want me to change something or something is not working. I did quick tests after clearing the conflicts and will do some more now. |
I just noticed that making clean npm install resulted unworking webpack example so there was some version change that broke it. I will make a commit to fix that soon. Otherwise I tested that the systemjs example works and the library also works in our angular-cli based project. |
Now the webpack example works as well. So everything should be working now. |
I'll check this tomorrow! THANKS ALWAYS!!!! |
The gulp file is not compiling now |
What do you mean that gulp file is not compiling? At least 'npm run build' runs without errors for me. |
gulpfile.js doesn't generate the compiled files that are distributed in ./lib |
For me it does, if I wipe lib directory and run npm run build all the files are generated into the lib directory. Do you get some errors or anything? |
Stops at compile:lib task |
I will try once more with clean npm install if I could get the problem re-produced and check the lib task what could be problematic there. I am not very familiar with gulp, but I looked at angular libs how they had gulp configured for aot building and studied it so that I would like to say it should be correctly setup. Did you have Linux/OSX or windows setup? Yes the lib is still compatible with systemjs and webpack and the examples work and sure there could be one example for aot as well. And I can make one next week if you want, but this week I am bit busy. Basically it is almost exactly like the webpack example, but with couple configuration changes so there could be aot build/run script added for the webpack example. |
Even with fresh npm install I don't get any errors when running build. The compile:lib task only runs the angular ngc compiler so it sound weird that you would have problems with that. You don't get any errors it just stops? |
I had bit of spare time so I added the built:aot and start:aot for the webpack example with the needed webpack configuration. So now the example has also an example for building with aot. |
your change are not working for us because you also have to make private template members public (see: https://medium.com/@isaacplmann/making-your-angular-2-library-statically-analyzable-for-aot-e1c6f3ebedd5#.l6z4qgvyi)
|
@sconix tried https://github.com/zefoy/ngx-color-picker. The problem mentioned by @seopei also exists in your project. Using your UMD Bundles works in dev mode but not with AoT and Rollup.
In https://medium.com/@isaacplmann/getting-your-angular-2-library-ready-for-aot-90d1347bcad#.rawiw332r I found:
|
Please can you make issues to my repo (https://github.com/zefoy/ngx-color-picker) directly so I can fix them. I have only used angular-cli / example apps for testing so its very likely that there are some issues left on other build systems but I will gladly fix them. I don't want to pollute this project at least not before these fixes are merged. |
Modified the building process to produce AOT compatible library and modified examples accordingly. Also upgraded to using newer typescript and angular versions.
This PR also includes the cpWidth, preset change detection and example app fixes.