Skip to content

Template uses absolute path to load the require.js script #36

@louismrose

Description

@louismrose

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 the getRelativeFileList function in the template provide by grunt-template-jasmine-requirejs?

Thanks for any help!

Cheers,
Louis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions