Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Commit

Permalink
Added targets documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sdesai committed Feb 27, 2009
1 parent 3b587c6 commit 3df81a9
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 36 deletions.
9 changes: 5 additions & 4 deletions componentbuild/README
Expand Up @@ -211,10 +211,11 @@ If you're creating:
FURTHER CUSTOMIZATION

If required, you can define custom values for any of the properties
defined in README.properties to customize the build for your new component,
however as mentioned above, for most components, the properties defined in
the template files, should be sufficient.
defined in builder/componentbuild/docs/properties.html to customize the
build for your new component, however as mentioned above, for most
components, the properties defined in the template files, should be
sufficient.

You can also over-ride or extend existing targets, to customize the actual
build process for a component if required. The list of targets and their
role is defined in README.targets
role is defined in builder/componentbuild/docs/targets.html.
208 changes: 208 additions & 0 deletions componentbuild/docs/targets.html
@@ -0,0 +1,208 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<title>YUI ANT Target Definitions</title>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset/reset-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/fonts/fonts-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/base/base-min.css">

<style type="text/css">
table {
margin:1em;
}

caption {
text-align:left;
font-weight:bold;
}

caption p {
margin:2px;
}

caption .filepath {
margin-top:0;
font-family:monospace;
color:#00aa00;
}
</style>
</head>

<body>
<table>
<caption>
<p>CORE TARGET DEFINITIONS</p><p class="filepath">(componentbuild/shared/targets.xml)</p>
</caption>
<thead>
<tr>
<th>Target</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>all</td>
<td>Invokes <code>local</code> and then <code>deploy</code>. This is
what you would normally call when you're ready
to check in your code to the build
directory.</td>
</tr>
<tr>
<td>local</td>
<td>Invokes <code>clean</code>, <code>init</code>, <code>build</code>, <code>minify</code> and
<code>lint</code>. This is what you would normally call,
when going through a development build, test, build, test cycle.</td>
</tr>
<tr>
<td>clean</td>
<td>Deletes the local build dir.</td>
</tr>
<tr>
<td>init</td>
<td>Creates the component's local build dir
(e.g. yui2/src/autocomplete/build_tmp).</td>
</tr>
<tr>
<td>build</td>
<td>Builds the component files in the local build dir.
The work actually performed in the build step varies
for the type of component and is defined by the type of
build file pulled in:
<ul>
<li>componentbuild/2.x/module.xml (2.x module targets)</li>
<li>componentbuild/3.x/module.xml (3.x standalone module targets)</li>
<li>componentbuild/3.x/rollup.xml (3.x rollup module targets)</li>
<li>componentbuild/shared/cssmodule.xml (2.x, 3.x CSS module targets)</li>
</ul>
The build targets introduced for
the above component types are discussed in
detail below.</td>
</tr>
<tr>
<td>minify</td>
<td>Compresses the built files in the local
build directory, to create
&lt;component&gt;-min.js (or
&lt;component&gt;-min.css for CSS modules)</td>
</tr>
<tr>
<td>lint</td>
<td>Runs jslint on the built files in the local build directory.</td>
</tr>
<tr>
<td>deploy</td>
<td>Copies the built files from the local build
directory, along with any assets, to the top
level build directory. It invokes <code>deploybuild</code>,
<code>deployassets</code>, <code>deployskins</code> and <code>deploydocs</code>.</td>
</tr>
<tr>
<td>deploybuild</td>
<td>Copies built files to global build location.</td>
</tr>
<tr>
<td>deployskins</td>
<td>Copies built skin CSS and related assets to the global build directory.</td>
</tr>
<tr>
<td>deployassets</td>
<td>Copies non-skin related assets to the global build directory, if they exist.</td>
</tr>
<tr>
<td>deploydocs</td>
<td>This target is currently a no-op.</td>
</tr>
</tbody>
</table>

<table>
<caption>
<p>YUI 2, YUI 3 MODULE BUILD</p>
<p class="filepath">(componentbuild/2.x/module.xml, componentbuild/3.x/module.xml)</p>
</caption>
<thead>
<tr>
<th>Target</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>build</td>
<td>Invokes the <code>buildcore</code> and <code>buildskins</code> targets</td>
</tr>
<tr>
<td>buildcore</td>
<td>Invokes <code>builddebug</code>. The results of
<code>builddebug</code> are then stripped of log statements to create the core (&lt;component&gt;.js) file.</td>
</tr>
<tr>
<td>builddebug</td>
<td>Concatenates the raw source files (with log
statements), to create &lt;component&gt;-debug.js, and adds the boilerplate registration code.</td>
</tr>
<tr>
<td>buildskins</td>
<td>Builds the component's Sam Skin file, by
concatenating and &lt;component&gt;-core.css
and &lt;component&gt;-skin.css. It also
compresses the file using yuicompressor.</td>
</tr>
</tbody>
</table>
<table>
<caption>
<p>YUI 3 ROLLUP BUILD</p><p class="filepath">(componentbuild/3.x/rollup.xml)</p>
</caption>
<thead>
<tr>
<th>Target</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>build</td>
<td>Invokes <code>buildmodules</code></td>
</tr>
<tr>
<td>buildmodules</td>
<td>Invokes the specified build xml file for each
of the sub modules, which build out the
modules, as normal, but also roll the results
back up into the rollup. The resulting rollup
files, then have the boilerplate registration
code added.</td>
</tr>
</tbody>
</table>
<table>
<caption>
<p>CSS MODULE BUILD</p><p class="filepath">(componentbuild/shared/cssmodule.xml)</p>
</caption>
<thead>
<tr>
<th>Target</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>build</td>
<td>Invokes the <code>buildcore</code> target. Note that for
CSS modules, we don't need a <code>buildskins</code>, or
<code>builddebug</code> step.</td>
</tr>
<tr>
<td>buildcore</td>
<td>Concatenates the raw CSS files.</td>
</tr>
</tbody>
</table>
</body>
</html>

32 changes: 0 additions & 32 deletions componentbuild/shared/targets.xml
Expand Up @@ -2,38 +2,6 @@

<project name="YuiSharedTargets">

<!--
TARGET DEFINITIONS
This file defines the core set of targets which make up the build process,
and which can be invoked via the ant command line, using ant <target>.
all Invokes "local" and then "deploy". This is what you would normally call
when you're ready to check in your code.
local Invokes "clean, init, build, minify, lint". This is what you would
normally call, when going through a local build/test/build/test cycle.
clean Deletes the local build dir
init Creates the component's local build dir (e.g. yui2/src/autocomplete/build_tmp)
build [abstract] Builds the component files in the local build dir. The work
actually performed in the build step varies for the type of component and is
defined by the type of build file pulled in (e.g. componentbuild/2.x/module.xml,
componentbuild/3.x/rollup.xml, componentbuild/shard/cssmodule.xml etc)
minify Compresses the built files
lint Runs lint on the built files
deploy Copies built code, along with any assets, to the top level build directory
The implementation of "build" is handled by the files in builder/componentbuild/2.x and
builder/componentbuild/3.x, which define the build steps for yui2 and yui3 components and
also account for the different types of components - modules, rollups, css modules etc.
-->

<echo level="info">Starting Build For ${component}</echo>

<echo level="info">Ant Properties</echo>
Expand Down

0 comments on commit 3df81a9

Please sign in to comment.