I write plugin, which has taglib like this:
class MyTagLib {
    static namespace = "my"
    Closure someWidget = { attrs ->
       // Need somehow add styles to page
       // ...
    }
}
I use asset-pipeline plugin and can't find any way to add stylesheets dynamicly (into head tag).
Base gsp layout of application (not my plugin):
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <g:layoutHead/>
    <title><g:layoutTitle/></title>
</head>
<body>
    <g:layoutBody/>
    <asset:deferredScripts/>
</body>
</html>
I need something like that in taglib:
g.putItIntoHead(asset.stylesheet(src: 'assets/my.css'))
 
     
    