-- dojonewb <martinga...@yahoo.com> wrote
(on Thursday, 04 March 2010, 06:49 AM +0000):
> Has anyone seen a tutorial that takes the entire chain of events from
> generating layers and build scripts all the way through to a completed
> view with a shrinksafe dojo?
> 
> Every tutorial I've read stopped at making the profile.  This is not so
> helpful when automating.  I made this to try and connect the two
> technologies:
> 
> //build layer
> $layerContents = $build->generateLayerScript();
> $layername      =  $ME['base_dir'].'lib/dojo/dojo/galleryview.js';
> if (!file_exists(dirname($layername))) {
> mkdir(dirname($layername));
> }
> file_put_contents($layername, $layerContents);
> 
> //build profile
> 
> $profileContents = $build->generateBuildProfile();
> $profilename = $ME['base_dir'].'lib/dojo/dojo/galleryview.profile.js';
> if (!file_exists(dirname($profilename))) {
> mkdir(dirname($profilename));
> }
> file_put_contents($profilename, $profileContents);
> 
> exec($ME['base_url'].'lib/dojo/dojo/util/buildscripts/build.sh

This won't work. You need to actually chdir to the buildscripts
directory, and run the script as 

    ./build.sh profileFile=relative/path/to/profile

for it to build correctly.

> profileFile='.$profilename.'
> action=release
> layerOptimize=shrinksafe
> stripConsole=all
> releaseDir='.$ME['base_dir'].'lib/dojo/release/
> cssOptimize=comments
> ', $captured_output, $return_value);

Most if not all the above can also be specified when you create the
build profile, which will leave you with only needing to specify the
profileFile directive.


> $VIEW->dojo()->addLayer($layername);
> 
> I put the profile right into the dojo directory.  It didn't work.  I think
> the directories I specified were completely wrong.  There is no
> documentation on what the directories for the dojo source files, the
> release directory and the profile have to be.  There is also no clear
> location to specify these directories in the profile and the build.sh
> commmand.  Has anyone been able to do this successfully?
> 
> 

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

Reply via email to