Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bertramdev/asset-pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
davydotcom committed Dec 31, 2014
2 parents 7710632 + 4e92c50 commit 867e804
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/docs/ref/Command Line/asset-clean.gdoc
@@ -0,0 +1,5 @@
h1. asset-clean

h2. Description

Cleans the directory where precompiled assets are stored (@target/assets@).
5 changes: 5 additions & 0 deletions src/docs/ref/Command Line/asset-compile.gdoc
@@ -0,0 +1,5 @@
h1. asset-precompile

h2. Description

Precompiles application assets
5 changes: 5 additions & 0 deletions src/docs/ref/Command Line/asset-precompile.gdoc
@@ -0,0 +1,5 @@
h1. asset-compile

h2. Description

Compiles application assets
18 changes: 18 additions & 0 deletions src/docs/ref/Tags/assetPath.gdoc
@@ -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}
11 changes: 11 additions & 0 deletions src/docs/ref/Tags/assetPathExists.gdoc
@@ -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}
6 changes: 6 additions & 0 deletions src/docs/ref/Tags/deferredScripts.gdoc
@@ -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.
14 changes: 14 additions & 0 deletions src/docs/ref/Tags/image.gdoc
@@ -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}
14 changes: 14 additions & 0 deletions src/docs/ref/Tags/javascript.gdoc
@@ -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}
16 changes: 16 additions & 0 deletions src/docs/ref/Tags/link.gdoc
@@ -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}
12 changes: 12 additions & 0 deletions src/docs/ref/Tags/script.gdoc
@@ -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}
15 changes: 15 additions & 0 deletions src/docs/ref/Tags/stylesheet.gdoc
@@ -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}

0 comments on commit 867e804

Please sign in to comment.