You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to get this to work in my project but it seems to have issues with pathing when the project root is not the webroot.
My project runs an express server, where {projectroot}/public is mounted by express as "/" and {projectroot}/client/bower_components is mounted as "/vendor".
However, it gets rewritten to a relative path eg. 'js/app/Application'.
My baseUrl in the require config is 'js/app', so the path does not resolve.
If I change the baseUrl to ".", then no dependencies in my project will resolve.
Is there a way to get the template to set a directory as the webroot that is used for path rewrites?
The text was updated successfully, but these errors were encountered:
I am having this same issue, and I believe it is also related to #36, and #45.
It seems that several of the dirs in the context/template are set up relative to the gruntfile, instead of relative to the outfile like they really should be. This is critical for projects that want to run their Jasmine tests from their app server's public or static folder, instead of from a static server at the root.
Hello, I'm trying to get this to work in my project but it seems to have issues with pathing when the project root is not the webroot.
My project runs an express server, where {projectroot}/public is mounted by express as "/" and {projectroot}/client/bower_components is mounted as "/vendor".
I've set the jasmine task like so:
jasmine: {
src: {
cwd: 'public/js/app',
expand: true,
src: 'Application.js'
},
options: {
host: 'http://127.0.0.1:8080/',
specs: 'test/spec/*_/_Spec.js',
keepRunner: true,
outfile: 'public/_SpecRunner.html',
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfigFile: 'public/js/require.config.js',
}
}
}
If I run grunt jasmine --v, I see this in my terminal:
Files: public/js/app/Application.js -> Application.js
However, it gets rewritten to a relative path eg. 'js/app/Application'.
My baseUrl in the require config is 'js/app', so the path does not resolve.
If I change the baseUrl to ".", then no dependencies in my project will resolve.
Is there a way to get the template to set a directory as the webroot that is used for path rewrites?
The text was updated successfully, but these errors were encountered: