Updated travis config, fixed race condition with RequireJS template
This commit is contained in:
parent
047631fcf5
commit
f5ba79756c
@ -1,3 +1,5 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
before_script:
|
||||
- npm install grunt-cli
|
||||
|
@ -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:
|
||||
|
@ -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",
|
||||
|
@ -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>
|
||||
<% }) %>
|
||||
<% }; %>
|
||||
|
@ -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>
|
||||
|
@ -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 || {}
|
||||
};
|
||||
|
2
test/fixtures/customTemplate/custom.tmpl
vendored
2
test/fixtures/customTemplate/custom.tmpl
vendored
@ -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>
|
||||
<% }) %>
|
||||
<% }; %>
|
||||
|
Loading…
Reference in New Issue
Block a user