Skip to content
Browse files

Merge pull request #8 from duckduckgo/zaahir/duckpan-concat-fix

Server.pm - updated to use new spice2_duckpan_compile.js, removed jQuery as it comes with spice2.js now
  • Loading branch information...
2 parents da23d71 + 3826672 commit 7edc58390bb87febd0c41d12f62ce0112aea0846 @moollaza moollaza committed Jul 15, 2013
Showing with 8 additions and 10 deletions.
  1. +8 −10 lib/App/DuckPAN/Cmd/Server.pm
View
18 lib/App/DuckPAN/Cmd/Server.pm
@@ -23,14 +23,13 @@ sub run {
dir($self->app->cfg->cache_path)->mkpath unless -d $self->app->cfg->cache_path;
my %spice_files = (
- 'page_root.html' => { name => 'DuckDuckGo HTML', file_path => '/' },
- 'page_spice.html' => { name => 'DuckDuckGo Spice-Template', file_path => '/?q=duckduckhack-template-for-spice2' },
- 'page.css' => { name => 'DuckDuckGo CSS', file_path => '/style.css' },
- 'duckduck.js' => { name => 'DuckDuckGo Javascript', file_path => '/duckduck.js' },
- 'jquery.js' => { name => 'jQuery', file_path => '/js/jquery/jquery-1.8.2.min.js' },
- 'handlebars.js' => { name => 'Handlebars.js', file_path => '/js/handlebars-1.0.0-rc.3.js' },
- 'spice2_latest.js' => { name => 'Spice2.js', file_path => '/spice2/spice2_latest.js' },
- 'spice2_duckpan.js' => { name => 'Spice2 DuckPAN javascript', file_path => '/spice2/spice2_duckpan.js' }
+ 'page_root.html' => { name => 'DuckDuckGo HTML', file_path => '/' },
+ 'page_spice.html' => { name => 'DuckDuckGo Spice-Template', file_path => '/?q=duckduckhack-template-for-spice2' },
+ 'page.css' => { name => 'DuckDuckGo CSS', file_path => '/style.css' },
+ 'duckduck.js' => { name => 'DuckDuckGo Javascript', file_path => '/duckduck.js' },
+ 'handlebars.js' => { name => 'Handlebars.js', file_path => '/js/handlebars-1.0.0-rc.3.js' },
+ 'spice2_duckpan.js' => { name => 'Spice2.js', file_path => '/spice2/spice2_duckpan.js' },
+ 'spice2_duckpan_compile.js' => { name => 'Spice2 DuckPAN compile script', file_path => '/spice2/spice2_duckpan_compile.js' }
);
my @blocks = @{$self->app->ddg->get_blocks_from_current_dir(@args)};
@@ -70,10 +69,9 @@ sub run {
# Concatenate all JS files
# Order matters because of dependencies
my $page_js = io(file($self->app->cfg->cache_path,'duckduck.js'))->slurp;
- $page_js .= io(file($self->app->cfg->cache_path,'jquery.js'))->slurp;
$page_js .= io(file($self->app->cfg->cache_path,'handlebars.js'))->slurp;
- $page_js .= io(file($self->app->cfg->cache_path,'spice2_latest.js'))->slurp;
$page_js .= io(file($self->app->cfg->cache_path,'spice2_duckpan.js'))->slurp;
+ $page_js .= io(file($self->app->cfg->cache_path,'spice2_duckpan_compile.js'))->slurp;
print "\n\nStarting up webserver...";
print "\n\nYou can stop the webserver with Ctrl-C";

0 comments on commit 7edc583

Please sign in to comment.
Something went wrong with that request. Please try again.