Comments (16)
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.
from fuelphp-casset.
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 Casset::js()
), so I suspect some effect of this is what is causing Casset to fall over. I'll do some testing when I get home tonight.
You probably want Casset:set_js_option('*', ...)
, as this will apply to all groups, instead of just the global group. Again, it won't apply to groups that don't exist yet, but I'll fix that tonight.
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 Setenv CONST value
), then use this to determine what value is set into the config file. There should be nothing wrong with your approach, though, so I'll fix whatever's breaking tonight.
E.g.
// In your config
'min' => FUEL_DEV ? false : true,
from fuelphp-casset.
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.
from fuelphp-casset.
Yeah. I'll force creating of the global group if it doesn't exist, and make '*' change the class property as well.
from fuelphp-casset.
Great stuff :)
from fuelphp-casset.
Can you test the feature/set_group_option_fix branch? Thanks
from fuelphp-casset.
Sure Ill get on it now.
from fuelphp-casset.
sorry need to do something first. Ill check it out later tonight. within a few hours.
from fuelphp-casset.
No worries
from fuelphp-casset.
Checked and have submitted pull request.
Its based off your feature branch.
Lee Overy
On 03/10/2011 18:21, "Antony Male"
[email protected]
wrote:
No worries
Reply to this email directly or view it on GitHub:
#9 (comment)
from fuelphp-casset.
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?
from fuelphp-casset.
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
Sent from my iPhone
On 3 Oct 2011, at 21:37, Antony Male [email protected] wrote:
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?
Reply to this email directly or view it on GitHub:
#9 (comment)
from fuelphp-casset.
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
from fuelphp-casset.
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.
from fuelphp-casset.
You probably know this but develop is broken at the moment but to this issue.
Sorry if Im stating obvious!
from fuelphp-casset.
All merged in :)
Sorry for the delay, was busy with something.
from fuelphp-casset.
Related Issues (20)
- combine() does not include all group files HOT 2
- Twig extension support HOT 2
- Doesn't seem to handle CSS URLs when symlinked HOT 5
- Correct base exception
- ErrorException [ Notice ]: Uninitialized string offset: 0 HOT 3
- Make composer/packagist compatibile HOT 4
- More parameters in "files" array: relative paths & '*' for globing HOT 10
- Change cache_path to public or static accessor function? HOT 2
- Add a "cache_retrieve" path HOT 1
- Cache path is not fully configurable HOT 2
- @Import issues HOT 13
- Add compatibility for inline JS/CSS groups HOT 5
- Path of js files HOT 6
- Conditional Stylesheets HOT 3
- Remote assets beginning with // fail to load HOT 2
- Assets are rendered several times HOT 4
- Twig addon img_url
- Added functionality to remove assets programatically
- add support for head/footer locations
- Even if necessary, white spaces were deleted. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuelphp-casset.