-
Notifications
You must be signed in to change notification settings - Fork 255
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
Generate source maps on build #324
Comments
I surely support that as default! :) +1 |
I have now tested this, and it seems to work well. I was able to add breakpoints in the code and look at the inner workings of Aurajs even when I was using the minified version. Howto: This is how chrome sees the minified file after I added source maps to it. I ran this example with jasmine: {
lpapi: {
options: {
specs: 'spec/lpapi/**/*_spec.js',
helpers: ['spec/libs/sinon-1.5.2.js', 'spec/libs/jasmine-sinon.js'],
keepRunner: true,
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
mainConfigFile: 'lib/config.js',
requireConfig: {
baseUrl: 'lib/',
paths: {
'jquerylib': '../bower_components/jquery/jquery',
'underscorelib': '../bower_components/underscore/underscore',
'textlib': '../bower_components/requirejs-text/text',
'aura': '../bower_components/aura/dist/'
},
shim: {
'jquerylib': {
exports: '$'
},
'underscorelib': {
exports: '_',
}
},
map: {
'*': {
'underscore': 'underscorelib',
'jquery': 'jquerylib',
'text': 'textlib'
}
}
}
}
}
}
}, |
Source maps are the new big thing. Requirejs has support for source maps and Aurajs should maybe utilize this. The documentation shows how simple it is to add the feature. I don't know if it has any implications on the build, but it seemed to generated the source maps just fine when I added the needed configuration element.
To utilize this we only need to add the following highlighted line to the requirejs section in the grunt file.
It might need some testing in a browser to see if it works as intended.
The text was updated successfully, but these errors were encountered: