Firstly, if this subject has been covered before, I’m sorry, I was unable to find anything via search or google. Secondly, I’m very new to ExpressionEngine, but I have been using CodeIgniter for quite a while now.
I would like to get some opinions (or suggestions) on what you lovely people think that the best practice or approach to asset (styles,scripts,images,etc) management is when working with EE. As far as I know, I have two ways that I can attach assets to documents/templates, either:
1.) Create a template that contains styles or javascript, and then use that to embed into other documents.
2.) Create an /assets dir in the root of the site, and use {base_url}/assets/css/file.css
Some background on this project may help.. I use grunt & sass/compass to compile and minify both css and javascript. I also use git service to deploy projects to various environments (staging and production for example), and as such, it’s important that these files can be updated and accessed without needing to update the database.
If anyone has any input on this, it’s very welcome!
Thank you ahead of time!