-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Allow a bundle to not have an output #164
Comments
So, I think your example should work fine with environment.debug=False. It'll only be a problem in debug mode, because now it tries to render the urls for It can't easily use
And the only way to resolve this while maintaining order would be to write everything into a single file, i.e. the equivalent of environment.debug=''merge". So if in debug mode you want everything in a single file, you should be fine by just using debug='merge' (also possible on a bundle-level). If you want separate urls for each css file, you need to provide an output file for the sass bundle. I'm not sure if there is anything that can be changed here. |
I'm currently getting this bug with the pyramid extension I developed: here are my bundles:
You see, I actually define an output for the common_style_bundle but when I actually use it, I generate a new output anyways:
but I get the error: BuildError: No output target found for <Bundle output=None, filters=[<webassets.filter.compass.CompassFilter object at 0x32cd310>], contents=('src/common/sass/*.sass',)> but both of the toplevel bundles I defined have outputs, the one its erroring on doesn't have one on its own but that should be ok? |
You want the output from both Someone else might want a separate output file for the less bundle, and a separate output file for the sass bundle. Right now, webassets expects everyone to be in group two. This is the way it works; if webassets encounters There is however a simple way for you to get the desired behavior: You can add This is the correct fix for you. There might be a way for webassets to be smart and to the right thing for you here - I'll need to look into it. But what it would do is simply silently treat FWIW, There is also a related ticket, #168, which would provide a mode where each of the less and sass source files would be compiled into their own output file, with no merging going on, thus letting you see clearly during development in the browser what particular source file a CSS file goes back to. |
It would be nice if it was smart enough to figure it out but this is enough information to work around it :) |
We should have the ability to define a bundle, without an output, so that it can be included in the templates which will declare an output.
For instance:
{% assets filters="cssmin", output="gen/packed.css", "boostrap.css", "styles.css", "sass" %}
sass in this case would be a bundle that you would declare:
sass = Bundle('static/sass/*.sass', filters='sass', debug=False)
No reason to require it to have an output since it'll be included with the tag.
The text was updated successfully, but these errors were encountered: