-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
Whoop. You the man
I guess it is. See http://blog.npmjs.org/post/112064849860/using-jquery-plugins-with-npm Let’s use this branch to work together. We should drop a line over here before we address an issue. To avoid working simultaneously on the same thing |
Now there's no need to add script-tags to use jquery and bootstrap. I require bootstrap and jquery inside the module where it's needed. But what about CSS? Is there a need to include CSS from libs the same way (i.e. with https://github.com/rotundasoftware/parcelify)? Otherwise, one would still touch the Gruntfile for adding CSS. |
+1 for parcelify. BUT. If maintainers don’t set the I don’t know if there are other options to automate bundling of vendor CSS. I don’t want to use https://github.com/yeoman/grunt-usemin because it’s unmaintained. |
Thanks for your feedback. Am i right that CSS-bundling is only relevant for dependencies outside bootstrap? Because bootstrap is not treated as a vendor, it's included in our client main less file? Once a library brings less it can be integrated by including it in the main client less file!? |
My pleasure 🐨
Jep.
Jep. We kinda build or own bootstrap
Yeah. At least that’s like I understood the approach like described over here. Some maintainers already use the |
* develop: Release v2.1.2 Fix travis error regarding Java version Update jQuery to the latest 1.x Run `.postinstall.js`explicitly with node Upgrade dev dependencies Add René Viering # Conflicts: # package.json
As discussed yesterday with @mischah, i added a few commits handling css for frontend-dependencies. Instead of parcelify, css files which belong to a frontend-dependency like »select2« are now added to the package.json property »frontendDependenciesCSS«. These defined css-files are automatically added to a »libs.min.css« in both directories, server and dist. |
import $ from 'jquery'; | ||
|
||
// this is necessary because bootstrap itself checks the existence of jQuery with window.jQuery. | ||
window.jQuery = $; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn’t we do a import jQuery from 'jquery';
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you could, but that wouldn't make it global.
I just removed the dependencyConfiguration module. Instead of this i use a simple function inside the Gruntfile to get the additional css files of frontend dependencies like »select2«. As discussed with @mischah today, we can now merge this branch into develop. I would suggest implementing the other improvements like »optimizing bundle file size« in separate feature branches after the merge!? |
Jep. Ready to merge 👌 I would prefer a rebase to get rid of a few commits to maintain a cleaner history (Especially for the changelog). 😘 |
Rebased with a few squashs and merged in develop 🎉 🎈 |
Hey,
i made a POC using ES6-Modules. The current status is:
We should talk about the need of the dependency configuration which is used to add frontend-dependencies in a more generic way. Maybe it's obsolete because of the use of browserify.