Updated travis config, fixed race condition with RequireJS template

This commit is contained in:
Jarrod Overson 2012-11-07 11:02:54 -08:00
parent 047631fcf5
commit f5ba79756c
7 changed files with 19 additions and 24 deletions

View File

@ -1,3 +1,5 @@
language: node_js
node_js:
- 0.8
before_script:
- npm install grunt-cli

View File

@ -1,3 +1,7 @@
v0.1.1:
date: 2012-11-07
changes:
- Fixed race condition in requirejs template
v0.1.0:
date: 2012-11-07
changes:

View File

@ -25,7 +25,7 @@
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test"
"test": "./node_modules/grunt-cli/bin/grunt test -vd"
},
"dependencies": {
"grunt-lib-phantomjs": "~0.1.0",

View File

@ -9,7 +9,7 @@
<% }) %>
<% with (scripts) { %>
<% [].concat(core.init, vendor, helpers, src, specs, reporters, core.helpers).forEach(function(script){ %>
<% [].concat(jasmine, vendor, helpers, src, specs, reporters, start).forEach(function(script){ %>
<script type="text/javascript" src="<%= script %>"></script>
<% }) %>
<% }; %>

View File

@ -16,7 +16,7 @@
<% }) %>
<% with (scripts) { %>
<% [].concat(core.init, vendor, helpers).forEach(function(script){ %>
<% [].concat(jasmine, vendor, helpers).forEach(function(script){ %>
<script type="text/javascript" src="<%= script %>"></script>
<% }) %>
<% }; %>
@ -24,26 +24,17 @@
<script>
require([
<% scripts.src.forEach(function(script, i){ %>
// <%= script %> <%= options.baseUrl %>
'<%= script.replace(new RegExp('^' + options.baseUrl),"").replace(/\.js$/,"") %>' <% if (i !== scripts.src.length-1){ %>,<% } %>
<% }) %>
], function(){
require([
<% scripts.specs.forEach(function(script, i){ %>
'<%= script %>' <% if (i !== scripts.specs.length-1){ %>,<% } %>
<% }) %>
], function(){
require([
<% [].concat(scripts.reporters, scripts.core.helpers).forEach(function(script, i){ %>
'<%= script %>' <% if (i !== [].concat(scripts.reporters, scripts.core.helpers).length-1){ %>,<% } %>
<% }) %>
], function(){
],
function(){
require(['<%= [].concat(scripts.specs,scripts.reporters).join("','") %>'], function(){
require(['<%= scripts.start.join("','") %>'], function(){
// good to go!
})
})
})
}
)
</script>
</head>

View File

@ -29,15 +29,13 @@ function buildSpecrunner(src, options){
var context = {
css : getRelativeFileList(jasmineCss),
scripts : {
core : {
init : getRelativeFileList(jasmineCore),
helpers : getRelativeFileList(jasmineHelper)
},
jasmine : getRelativeFileList(jasmineCore),
helpers : getRelativeFileList(options.helpers),
specs : getRelativeFileList(options.specs),
src : getRelativeFileList(src),
vendor : getRelativeFileList(options.vendor),
reporters : getRelativeFileList(reporters)
reporters : getRelativeFileList(reporters),
start : getRelativeFileList(jasmineHelper)
},
options : options.templateOptions || {}
};

View File

@ -9,7 +9,7 @@
<% }) %>
<% with (scripts) { %>
<% [].concat(core.init, vendor, helpers, src, specs, reporters, core.helpers).forEach(function(script){ %>
<% [].concat(jasmine, vendor, helpers, src, specs, reporters, start).forEach(function(script){ %>
<script type="text/javascript" src="<%= script %>"></script>
<% }) %>
<% }; %>