Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
grunt-monty-python
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
16543fe8
authored
2016-02-18 16:04:17 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix passing of mpConfig.base into jasmine requirejs callback function.
1 parent
d03828e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
grunt-monty-python.js
package.json
grunt-monty-python.js
View file @
16543fe
...
...
@@ -407,7 +407,7 @@ module.exports = function (grunt) {
},
};
if
(
mpConfig
.
jasmine
.
withCoverage
)
{
templateOptions
.
requireConfig
.
callback
=
function
(
)
{
var
instrumentationCallback
=
function
instrumentationCallback
(
mpConfigBase
)
{
/* global requirejs:false */
var
oldLoad
=
requirejs
.
load
;
requirejs
.
load
=
function
(
context
,
moduleName
,
url
)
{
...
...
@@ -431,13 +431,17 @@ module.exports = function (grunt) {
}
}
url
=
parts
.
join
(
'/'
);
if
(
url
.
indexOf
(
mpConfig
.
b
ase
+
'/scripts/'
)
===
0
)
{
if
(
url
.
indexOf
(
mpConfig
B
ase
+
'/scripts/'
)
===
0
)
{
url
=
'./.grunt/grunt-contrib-jasmine/'
+
url
;
}
return
oldLoad
.
apply
(
this
,
[
context
,
moduleName
,
url
]);
};
};
var
stringify
=
require
(
'node-stringify'
);
//templateOptions.requireConfig.callback = eval('(' + stringify(callbackBuilder) + ')(' + JSON.stringify(mpConfig.base) + ')');
templateOptions
.
requireConfig
.
callback
=
new
Function
(
stringify
(
instrumentationCallback
)
+
'('
+
JSON
.
stringify
(
mpConfig
.
base
)
+
');'
);
templateOptions
=
{
coverage
:
'dist/coverage/coverage.json'
,
report
:
'dist/coverage'
,
...
...
package.json
View file @
16543fe
...
...
@@ -36,6 +36,7 @@
"jshint-stylish"
:
"~0"
,
"load-grunt-tasks"
:
""
,
"lodash"
:
""
,
"node-stringify"
:
""
,
"punch"
:
"~0.5.46"
,
"punch-html-fragment-content-parser"
:
"^0.5.1"
},
...
...
Please
register
or
sign in
to post a comment