grunt-contrib-jasmine/tasks/jasmine/templates/RequireJSRunner.tmpl
2012-11-07 10:56:19 -08:00

45 lines
1.1 KiB
Cheetah

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Jasmine Spec Runner</title>
<script src="<%= options.requirejs %>"></script>
<script>
require.config({
baseUrl : '<%= options.baseUrl %>'
});
</script>
<% css.forEach(function(style){ %>
<link rel="stylesheet" type="text/css" href="<%= style %>">
<% }) %>
<% with (scripts) { %>
<% [].concat(jasmine, vendor, helpers).forEach(function(script){ %>
<script type="text/javascript" src="<%= script %>"></script>
<% }) %>
<% }; %>
<script>
require([
<% scripts.src.forEach(function(script, i){ %>
'<%= script.replace(new RegExp('^' + options.baseUrl),"").replace(/\.js$/,"") %>' <% if (i !== scripts.src.length-1){ %>,<% } %>
<% }) %>
],
function(){
require(['<%= [].concat(scripts.specs,scripts.reporters).join("','") %>'], function(){
require(['<%= scripts.start.join("','") %>'], function(){
// good to go!
})
})
}
)
</script>
</head>
<body>
</body>
</html>