MarioRicalde / AVA-Pattern

Arrangement for View Assets Pattern
31 stars 4 forks source link

Assumptions on Asset Manager #5

Open MarioRicalde opened 13 years ago

MarioRicalde commented 13 years ago

As of now with AVA Pattern we've been making some assumptions on the javascripts and stylesheets directories, most of them are related to the fact that to really get benefits from AVA Pattern you need to have a Asset Manager to merge files into one and to minify them accordingly.

Do you think this is bad?

Somehow I think that these assumptions are a good practice that everyone should be including on their developing environments. Having one HUGE file or multiple files invoked from the main HTML document is not a good practice.

Thoughts?

MarioRicalde commented 13 years ago

Of course, most of the Rails Developers that could use this in the future will be using Sprockets by default.

dfischer commented 13 years ago

Technically, on the SASS side, you wouldn't need to have an asset manager for this to work. You would just be @importing across files. Am I wrong?

I have less expertise on the javascript opinion.

When you say "to really get benefits from AVA pattern you need to have a Asset Manager to merge..." why do you think that to really get the benefit from the AVA pattern you have to use an asset manager? I actually see the AVA pattern existing outside of that as a general best practice of how to structure your stylesheets and javascripts.

MarioRicalde commented 13 years ago

AVA enforces splitting the code into multiple files, some people may want to use this by including files into the html document. That's bad!

When I mean asset packager, is anything that grabs the files and merge them (including sass) :)

dfischer commented 13 years ago

Okay. I think we have a solution then. We can create a section of the documentation and possibly helper scripts to automatically compile down in case Rails isn't present, or Sass for that matter.

YUI compressor script?