optionally build angular and use it if available
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 31 Oct 2010 15:00:04 +0000 (16:00 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 31 Oct 2010 15:00:04 +0000 (16:00 +0100)
README
angular-server.pl

diff --git a/README b/README
index 0699a37..d6287ff 100644 (file)
--- a/README
+++ b/README
@@ -19,10 +19,16 @@ using simple in-memory model for experimenting with local datasets using
 
 Installation:
 
-    git submodule init
-    git submodule update
+       git submodule init
+       git submodule update
+
+Optionally build angular to get single file download
+
+       cd public/angular
+       rake compile
+       cd -
 
 Start it with:
 
-    ./angular-server.pl daemon --reload  
+       ./angular-server.pl daemon --reload  
 
index 537d1b8..a3daeec 100755 (executable)
@@ -125,7 +125,7 @@ get '/demo/:groovy' => sub {
 get '/Cookbook' => 'Cookbook';
 get '/Cookbook/:example' => sub {
        my $self = shift;
-       $self->stash('ANGULAR_JS', $ENV{ANGULAR_JS} || '/angular/src/angular-bootstrap.js' );
+       $self->stash('ANGULAR_JS', $ENV{ANGULAR_JS} || ( -e 'public/angular/build/angular.js' ? '/angular/build/angular.js' : '/angular/src/angular-bootstrap.js' ) );
        $self->render( "Cookbook/" . $self->param('example'), layout => 'angular' );
 };