On Sun, Jun 9, 2013 at 8:00 PM, Chris Rohr <[email protected]> wrote:
> Aaron - To your point yes this is possible.  If you look in 
> blur-admin/app/assets/javascripts/hdfs_metrics.js you will see that there 
> looks like a comment for d3.js and flot.js.  In the Rails asset pipeline, 
> when in production mode, all of the javascript listed in that file will be 
> combined (and minified) into one javascript file to be served up to the 
> browser.  So yes at run time there will be multiple licenses in one js file.  
> A side note to this is whether the minification of the javascript will remove 
> the license comments.  I will have to check on that though.
>
> Tim - My question is to figure out which type of comment to use.  In any of 
> the .haml files inside of blur-admin/app/views I can either add a HAML 
> comment or an HTML comment.  If I add a HAML comment then it will be in the 
> source but when Rails renders the page the markup will not include the 
> license.  If I add an HTML comment it will be preserved post rendering.  The 
> same goes for any of the.scss files in blur-admin/app/assets/stylesheets, I 
> can either add a SASS comment or a CSS comment, where the same thing as the 
> HAML will occur.

I wasn't sure how to answer this, so I've taken a spin through
Bloodhound sources - they have a similar situation of  a single page
being rendered from multiple source templates. Assuming it's
reasonably safe to follow what Bloodhound does, I think the answer is,
it depends and the approach below works (and someone will correct me
if not):

o) Use rendered comments (ie HTML or CSS) to ensure that the whole,
rendered resource contains the header.  So, for many pages, an HTML
comment in application.html.haml would presumably do.

o) Use source comments for (ie HAML or SCSS) for any components of an
overall rendered page.

Does that help?

Thanks,
--tim

Reply via email to