-
Notifications
You must be signed in to change notification settings - Fork 110
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
Enable possibility to create minified file inside subdirectory #178
Comments
By default, the group name is used as the final name of the minified resource. It doesn't create folders. As a note, there is an open issue which aims to produce a minimized resource for each processed resource at a predefined location. But I'm not sure if this feature would be useful for you. |
I see The aim here is to concatenate some files and keep others as is, but be able to separate them in directories. This way I could be able to create a better organized structure for dynamic calls in the front end as: require([
"jquery",
"angular/controllers/TagsController",
"angular/directives/TagDirective"
], function( $, TagsController, TagDirective ) {
// ...
});
Do you mean #122? |
The real solution here would be to concatenate my files using requireJS, but since this is not supported, a directory separation is needed to maintain the structure well organized. |
I mean this issue: https://code.google.com/p/wro4j/issues/detail?id=583&can=1&q=Milestone%3DRelease-1.7.5 I think wro4j and requireJS have overlapping features. Using both of them is not very straightforward. Nevertheless, I'm keen to make wro4j as friendly as possible with other tools. |
That issue is kind of similar. It's unfortunate wro4j have overlapping features, it would be very nice some kind of "2.0" version with a different approach :D |
I would appreciate if you could elaborate on the meaning of "different". There are dozen of approach for similar problems. A project should evolve on specific needs. It would be a waste of time and effort to clone an existing tool. Don't get me wrong, I'm just trying to understand better your requirements. |
My suggestion of "different" would be leverage AMD for files concatenation or provide means to easly do so. Currently it concatenates everything based on specific approaches provided by wro4j and it is impossible to leverage requireJS in any way (except creating separate files for minification). To be a little more clear: |
If the r.js would be used by wro4j, what would be the wro4j purpose? I'm not sure I understand the entire picture. What exactly is the reason of not using require.js exclusively for your use-case? I know, it sounds weird that I ask that, but I would like to have a better understanding of the problem. |
I use wro4j maven plugin to pre process less and concatenate files that do not support AMD, like prepending a I prefer write my non-AMD plugins as modules on the fly instead of using shim configs. |
In that case, from your point of view, what is the ideal workflow of wro4j maven plugin (it could be also a different goal) which would fit for your use-case? Saying that it should concatenate everything using requireJS is not enough. The requirements should be more specific. This is the phase where we can define new requirements. |
My workflow suggestion would be to configure requireJS files somehow and define an output. Then wro4j would load those files, process with Maybe use a pattern to specify the files to be considered, or wro4j could read the files and check for Does that makes sense? |
It probably makes sense, but still is not specific enough. Starting with a basic example would help. The most difficult part, is to describe the requirements in detail. That is why your help is very valuable. |
I understand the issues to create something like that. The idea would be to use rhino or node/phantomJS, the only two solutions that exist today. If it is too hard I think the only solution for my end would be using grunt and integrate the build system with eclipse and maven using phantomJS. |
I agree that the best tools are those which solves the problems you have. I'm not claiming that wro4j is a silver bullet solution. If using grunt does fit your needs, than probably it is the best tool for you. Thank you for your feedback. |
Just a follow-up. I have been reading this issue again thought it would be worth the comment:
Except it is not, grunt is the same as maven and have no integration with eclipse. I use eclipse and maven for my front-end and back-end development, I do not use grunt because I have no ideia of how to integrate it in my workflow inside maven build lifecycle. There is no reason for using yet another build tool along with maven. Wro4j is the only tool that I just write some XML and start using it, and that is why I am using it instead of another build tool for front-end resources. |
@alexo, I have open sourced a project so you can see my workflow using requireJS and wro4j. As you can see here I have my JS files. Here I configure each file that I want to concatenate, the files are created in a local The main purpose of this issue is the lack to be able to concatenate files and output them to an specific directory, so I can load using Check here how I am loading my resources through AMD. |
Looking through the docs I couldn't find a solution, sorry to post here if this feature already exists.
The plugin currently does not support minification of resources with angularJS or requireJS in mind, so I am creating an app with multiple javascript files separated by directories and minifying them as necessary using wro4j maven plugin.
The problem is that the wro.xml does not allow me to output the minified resources in a separate directory from the
js
root folder.This will not create the directories:
<group name="angular/controllers/MyController.js"> ... </group>
Is this feature feasible to be implemented or this is out of scope of the project?
I ask this because I am thinking into change my minification and concatenation process, wro4j does not seems to be enough for the most used front-end tools out there.
Any thoughts?
The text was updated successfully, but these errors were encountered: