Documentation ¶
Overview ¶
Package sprockets integrates the power of sprockets ( http://getsprockets.org ) with your go program.
To use in development:
- Assets go in '/assets'
- Install the 'rack' and 'sprockets' rubygems
- run `rackup src/github.com/99designs/goodies/sprockets/config.ru`
- In your app, call 'NewSprocketsServer("http://localhost:8012", "assets") to get a ViewHelper'
- Use the ViewHelper to generate links to your assets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetPipeline ¶
type SprocketsDirectory ¶
type SprocketsDirectory struct {
// contains filtered or unexported fields
}
func (*SprocketsDirectory) GetAssetContents ¶
func (s *SprocketsDirectory) GetAssetContents(name string) ([]byte, error)
func (*SprocketsDirectory) GetAssetUrl ¶
func (s *SprocketsDirectory) GetAssetUrl(name string) (template.HTMLAttr, error)
type SprocketsServer ¶
type SprocketsServer struct {
// contains filtered or unexported fields
}
func (*SprocketsServer) GetAssetContents ¶
func (s *SprocketsServer) GetAssetContents(name string) ([]byte, error)
func (*SprocketsServer) GetAssetUrl ¶
func (s *SprocketsServer) GetAssetUrl(name string) (template.HTMLAttr, error)
type ViewHelper ¶
type ViewHelper struct {
AssetPipeline
}
func NewSprocketsDirectory ¶
func NewSprocketsDirectory(dirpath, prefix string) (ViewHelper, error)
func NewSprocketsServer ¶
func NewSprocketsServer(baseUrl, manifestPath string) (ViewHelper, error)
func (*ViewHelper) JavascriptTag ¶
func (vh *ViewHelper) JavascriptTag(name string) (template.HTML, error)
func (*ViewHelper) StylesheetLinkTag ¶
func (vh *ViewHelper) StylesheetLinkTag(name string) (template.HTML, error)
Click to show internal directories.
Click to hide internal directories.