-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template uses absolute path to load the require.js script #36
Comments
For anyone else who faces this issue, I should mention that I'm using a symlink task in Grunt to workaround this for now: I add a symlink to the .grunt directory from the directory to which my spec runner is generated. |
I used a grunt-contrib-copy task to work around this. I modified the template file, stored it out of the node_modules directory, and as part of my unit test grunt task I copy it over the original each time. Symlinks weren't an option for me as we're both *nix and Windows. |
Thanks for the symlink idea. |
I just submitted pull request #45 which would allow the user to set |
Fixed in v0.1.10 |
Hi,
Thanks so much for this template, which has saved me masses of time in getting our app ported over to Grunt!
I've noticed what I think might be a slight issues with the template that generates the Jasmine spec runner. It seems that the generated script tag for require.js always uses the absolute path, rather than the relative path, to the ".grunt" folder. More specifically, line 11 of the template (
<script src="<%= temp %>/require.js"></script>
) generates<script src=".grunt/grunt-contrib-jasmine/require.js"></script>
Curiously, the script tags that reference other files in the .grunt directory do not have this issue. For my setup they generate the correct relative path, such as
<script src="../.grunt/grunt-contrib-jasmine/jasmine.js"></script>
I've taken a quick look at the grunt-contrib-jasmine project, and it seems to provide a function called
getRelativeFileList
that might be used to solve this issue. I don't feel that I know enough about the internals of either project to provide a patch, but would be happy to do so if somebody could provide a little bit of direction -- is this the right approach? And how would we access thegetRelativeFileList
function in the template provide by grunt-template-jasmine-requirejs?Thanks for any help!
Cheers,
Louis.
The text was updated successfully, but these errors were encountered: