Welcome Guest, Not a member yet? Register   Sign In
HAML/SASS support to CodeIgniter
#1

[eluser]redvulps[/eluser]
Some time ago, I'd a project to work on, but since I'm working more with Rails today, I've been missing a lot of cool things.

One of those thing was the HAML and SASS support, and since there is no complete/updated library available, I've decided to work on something.

Currently I've forked the Codeigniter project on github(https://github.com/redvulps/codeigniter-haml-sass) and I also made a blog post(http://redvulpine.com/blog/using-haml-wi...igniter-96) about it if you only want to add the HAML support as an standard external library.

For now, only the HAML support is available, but, since I use CodeIgniter as base framework for all my PHP projects, I'll be adding the SASS support too.

To use it, simply create your file as "my_haml_view.haml"(in the case of code in my blog, the file should be my_view_file.html.haml) and put into your views directory and load like you already do.

Code:
$this->load->view("my_haml_view")

Any comments or ideas will be very appreciated. Thanks!
#2

[eluser]redvulps[/eluser]
Updating.. I've added the SASS support right now. Available on GitHub https://github.com/redvulps/codeigniter-haml-sass

I still have some work to do on this part, but it's fully usable by now =)
#3

[eluser]jmadsen[/eluser]
nice! I love sass - will look this over
#4

[eluser]redvulps[/eluser]
[quote author="jmadsen" date="1332546959"]nice! I love sass - will look this over[/quote]
Good to hear that =) .. any issues or ideas, just tell me.
#5

[eluser]redvulps[/eluser]
Updating =)

Quote:c10ffdcf09205c7cd1ea0c6e4430cfbfe10915f0 - Changed the SassParser to notify when a file came from the cache to avoid CI from making unnecessary file writes

For now I guess the code is fully usable in production, if anyone want to help on testing, just tell me =)
#6

[eluser]redvulps[/eluser]
Just updating

https://github.com/redvulps/codeigniter-...3277fc21a0

Quote:- Fixed debug message

- Fixed HAML cache if the controller is located in a subpath inside the controller path like "controllers/admin/"
#7

[eluser]Edmundas KondraĊĦovas[/eluser]
I have mixed feelings about this. I personally don't use HAML or SASS but is there any particular reason why you are putting stuff inside system folder and messing with default CI files? For years I've been a big supporter of "keep your fingers off CodeIgniter's internals" mainly due to possible future conflicts when updating CI.

application/core dir is where you would normally extend the system: MY_Loader, MY_Controller etc. I see you kind of wrote it yourself in your blog post.

I'm not trying to throw dirt here but to me messing with CodeIgniter directly is a big "NO".
#8

[eluser]redvulps[/eluser]
I have to agree with it. I really don't like to change the "core" of those things, but, it's for a specific use(and I wanted to share =) ), that's why I've created the fork, in other projects, I use the extending method like it's posted in my blog(and I'll update it soon).
#9

[eluser]Unknown[/eluser]
http://www.greatoakleysunglasses.com/
"thank you for marvelous posting! I quite enjoyed reading it, you are a great author want to encourage that you continue your great job, have a nice day!
"




Theme © iAndrew 2016 - Forum software by © MyBB