Make sure that node.js is installed.
Then, run:
$ npm install
$ ant dist
For building and minifying CCC:
$ ant build-pvc-ccc-release assemble
$ karma
$ ./generateJsDocs.sh
The CCC site has one HTML page per chart type, each containing several live examples and summary documentation of its options and extension points.
The pages are loaded in an iframe, from CCC's site main page, through a chart type selector.
Pages are based on a template composed by:
- Page header: site/resources/cccExampleHeader.html;
- Examples section, containing several examples, generated by the XSLT template site/gen/genTemplates.xsl, from the examples registered in site/gen/templates.xml, and whose code is in files placed under site/resources;
- Options and Extension points summary sections, generated by the XSLT template doc/gen/summary/com2html-summary.xsl, from the information in CCC's XML docs;
- Page footer: site/resources/cccExampleFooter.html.
For markup related changes to each example's template, the XSLT template must be modified. If you don't master XSLT, and the changes are small enough, you should have no problem: just concentrate on the HTML elements, that you'll surely recognize. Remember that a XSLT file is an XML file, and so XHTML markup must be used (it's known to not be forgiving of missing closing tags and such).
For CSS and Script related changes, first check the chart site/resources/cccExampleHeader.html file.
You may need to change the CSS and JS files that specifically exist to support the chart type pages. These files are placed under site/root/ctools/charts/lib. These are copied to the site's output folder when the site is generated.
Notice that all other content under site/root is only used to help the development of the chart type pages, and is thus not deployed to the actual site, where the same, or similar, surrounding context is expected to exist.
If you want to change the options of an example (the color scale?), you should directly modify the specific example's file. Each example has a corresponding code file, placed under site/resources. The files are numbered according to their registration index in site/gen/templates.xml.
Make sure you have built the code and generated the JavaScript options' documentation. Then, run:
$ ./generateSite.sh
Go to dist/site/ctools/charts/
and check if the generated chart type pages look and behave like you want.
Finally, deploy the changes to the CCC's site,
using syncToDemoDotWebdetails.sh.
Note that you might need to locally modify the script,
to prepend your user name to the front of the
site's url, as in [email protected]
, when it differs from your current system user.
Then run:
$ ./syncToDemoDotWebdetails.sh
The deploy script, only synchronizes the contents of the dist/site/ctools/charts/
directory.