Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:bertramdev/asset-pipeline
- Loading branch information
Showing
11 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
h1. asset-clean | ||
|
||
h2. Description | ||
|
||
Cleans the directory where precompiled assets are stored (@target/assets@). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
h1. asset-precompile | ||
|
||
h2. Description | ||
|
||
Precompiles application assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
h1. asset-compile | ||
|
||
h2. Description | ||
|
||
Compiles application assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
h1. asset:assetPath | ||
|
||
h2. Description | ||
|
||
Returns the runtime URL of an asset. This tag automatically handle swapout of cache digest names during production | ||
use as well as any custom URL mapping changes, e.g. | ||
|
||
{code} | ||
<link href="${assetPath(src: 'manifest.json')}"/> | ||
{code} | ||
|
||
h2. Attributes | ||
|
||
{table} | ||
*Name* | *Required* | *Description* | ||
*src* | Yes | Path to the asset from @grails-app/assets@ (excluding the first subdirectory) | ||
*absolute* | No | If truthy, an absolute URL will be returned. By default, a relative URL is used. | ||
{table} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
h1. asset:assetPathExists | ||
|
||
h2. Description | ||
|
||
If an asset with the specified path exists, the body of this tag will be rendered, e.g. | ||
|
||
{code} | ||
<asset:assetPathExists src="foo/test.js"> | ||
This will only be displayed if there is an asset at foo/test.js | ||
</asset:assetPathExists> | ||
{code} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
h1. asset:deferredScripts | ||
|
||
h2. Description | ||
|
||
Indicates the point in a page where inline JavaScript blocks (created by @<asset:script>@) should be rendered. Typically | ||
this is at the bottom of a layout GSP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
h1. asset:image | ||
|
||
h2. Description | ||
|
||
Creates an @<img>@ element, e.g. {code}<asset:image href="example/foo.png" absolute="true"/>{code} | ||
Any attributes other than those described below will be forwarded to the @<img>@ element generated by this tag. | ||
|
||
h2. Attributes | ||
|
||
{table} | ||
*Name* | *Required* | *Description* | ||
*src* | Yes | Path to the image file | ||
*absolute* | No | If truthy, an absolute URL will be used for the @src@ attribute of the generated @<img>@ element. By default, a relative URL is used. | ||
{table} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
h1. asset:javascript | ||
|
||
h2. Description | ||
|
||
Include a JavaScript file in a page, e.g. {code}<asset:javascript src="home.js"/>{code} | ||
Any attributes other than those described below will be forwarded to the @<script>@ element generated by this tag. | ||
|
||
h2. Attributes | ||
|
||
{table} | ||
*Name* | *Required* | *Description* | ||
*src* | Yes | Path to the JavaScript file | ||
*charset* | No | The file's character set | ||
{table} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
h1. asset:link | ||
|
||
h2. Description | ||
|
||
Generates a @<link>@ element for an asset, e.g. | ||
{code}<asset:link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>{code} | ||
Any attributes other than those described below will be forwarded to the @<link>@ element generated by this tag. | ||
|
||
h2. Attributes | ||
|
||
{table} | ||
*Name* | *Required* | *Description* | ||
*href* | Yes | Path to the asset | ||
*rel* | No | The value of the @rel@ attribute of the generated @<link>@ element | ||
*type* | No | The value of the @type@ attribute of the generated @<link>@ element | ||
{table} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
h1. asset:script | ||
|
||
h2. Description | ||
|
||
Adds an inline block of JavaScript to a page. The point in the page where this block will be rendered is determined | ||
by the placement of @<asset:deferredScripts/>@ | ||
|
||
{code} | ||
<asset:script> | ||
console.log('hello world'); | ||
</asset:script> | ||
{code} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
h1. asset:stylesheet | ||
|
||
h2. Description | ||
|
||
Include a CSS file in a page, e.g. {code}<asset:stylesheet href="example/style.css"/>{code}Any attributes other than those | ||
described below will be forwarded to the @<style>@ element generated by this tag. | ||
|
||
h2. Attributes | ||
|
||
{table} | ||
*Name* | *Required* | *Description* | ||
*src* | if @href@ is not provided | Path to the CSS file | ||
*href* | if @src@ is not provided | An alias for @src@ | ||
*charset* | No | The file's character set | ||
{table} |