From e5a5e3c2223e6473679b57c7132e178ea0113dcf Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 31 Oct 2010 16:00:04 +0100 Subject: [PATCH] optionally build angular and use it if available --- README | 12 +++++++++--- angular-server.pl | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README b/README index 0699a37..d6287ff 100644 --- 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 diff --git a/angular-server.pl b/angular-server.pl index 537d1b8..a3daeec 100755 --- a/angular-server.pl +++ b/angular-server.pl @@ -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' ); }; -- 2.20.1