Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added targets documentation

  • Loading branch information...
commit 3df81a94d3b5dada452326c1be2118f6e67fd58b 1 parent 3b587c6
@sdesai sdesai authored
View
9 componentbuild/README
@@ -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.
View
208 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>
+
View
32 componentbuild/shared/targets.xml
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.