-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
set_js_option doesnt seem to work with group left blank... #9
Comments
As a follow up Ive now decided to use a closure in the casset config to achieve the desired result. In the min and combine config options I simply return from a closure an environment bool. |
Right... Just trying to work out what's going on here. Currently, set_*_option only applies itself to groups which already exist. The global group doesn't exist until you add something to it (e.g. using You probably want My normal approach is to define a constant based on whether I'm in a dev environment or not (you can set this from a .htaccess file with E.g. // In your config
'min' => FUEL_DEV ? false : true, |
Thanks. Im pretty sure I tried the asterix option as "group" too. Infact I used that first but it didnt seem to work with global. I was trying to do this before using Casset::js() so thats probably the issue. |
Yeah. I'll force creating of the global group if it doesn't exist, and make '*' change the class property as well. |
Great stuff :) |
Can you test the feature/set_group_option_fix branch? Thanks |
Sure Ill get on it now. |
sorry need to do something first. Ill check it out later tonight. within a few hours. |
No worries |
Checked and have submitted pull request. Its based off your feature branch. Lee Overy On 03/10/2011 18:21, "Antony Male"
|
Good catch! Thanks, tidied it up a little (watch those whitespace changes) and merged in. Congrats on your first included commit :) Does that all work? |
Haha thanks. I noticed those whitespace diffs. I strip all white space when I save each file using textmate on mac. I'll check it out in a bit. Lee On 3 Oct 2011, at 21:37, Antony Male reply@reply.github.com wrote:
|
Netbeans did up until the point where I re-installed it... Oh well. I'll make a dedicated whitespace-fixing commit in a bit, keep all the noise in the same place :P |
All checked and working fine my end. Good stuff. (from your feature branch with my commit) This is also getting me pretty sharp at Git too which is a good thing :) I also use GitFlow btw. |
You probably know this but develop is broken at the moment but to this issue. Sorry if Im stating obvious! |
All merged in :) Sorry for the delay, was busy with something. |
* feature/set_group_option_fix: Add option prep method so group options are passed through to the add_group method. If set_group_option is used with all groups ('*'), then change the default. Create the global groups on initialisation, if it doesn't exist. set_group_option() will throw an exception if the named group doesn't exist. Add new function to tell whether a group exists. Closes canton7#9
Hey,
Im trying to add the following lines from my common base controller:
They are enclosed in an IF clause and are only executed if we are in a development environment. I wont want anything minified or combined when working locally.
I have one group at the moment (jquery) and 2 JS files added via Casset::js(); It all works ok when I change the options from config. But when the above lines are left in the code, the following errors appear:
Hope thats enough info to go on.
Ive tried to see whats going on here but cant figure it out.
My expected result of this is that all JS, whether from the 'global' group or otherwise, will be injected into the markup un-minified and un-combined.
As an aside, if there is a better of way of doing what Im trying to do, Im all ears :)
Thanks.
Lee
The text was updated successfully, but these errors were encountered: