From 20aebec1fdd7b403e3736b922308eb48ebc9418d Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Wed, 12 Feb 2014 16:58:24 +0000 Subject: [PATCH] Moved scripts inside the body tag Putting scripts as the last item before the closing body tag is these days probably the most common approach to loading scripts in a page, so the jasmine template should arguably follow this convention. Also this means setup scripts within my src that assume body is present and which run before any specs do will not throw an error --- tasks/jasmine/templates/DefaultRunner.tmpl | 5 +++-- test/expected/defaultTemplate.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tasks/jasmine/templates/DefaultRunner.tmpl b/tasks/jasmine/templates/DefaultRunner.tmpl index bd1b2f3..454e3f9 100644 --- a/tasks/jasmine/templates/DefaultRunner.tmpl +++ b/tasks/jasmine/templates/DefaultRunner.tmpl @@ -6,12 +6,13 @@ <% css.forEach(function(style){ %> <% }) %> + + + <% with (scripts) { %> <% [].concat(polyfills, jasmine, boot, vendor, helpers, src, specs,reporters).forEach(function(script){ %> <% }) %> <% }; %> - - diff --git a/test/expected/defaultTemplate.html b/test/expected/defaultTemplate.html index b5616f1..6530ea8 100644 --- a/test/expected/defaultTemplate.html +++ b/test/expected/defaultTemplate.html @@ -6,6 +6,8 @@ + + @@ -19,7 +21,5 @@ - - \ No newline at end of file