-
Notifications
You must be signed in to change notification settings - Fork 36
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
Extend pluginOptions to also cover gulp-sourcemaps #65
Extend pluginOptions to also cover gulp-sourcemaps #65
Conversation
Thanks for the PR! Definitely on the right track. A couple things:
main: {
scripts: [
'./*.js'
],
styles: [
'./*.css'
],
options: {
pluginOptions: {
'gulp-sourcemaps': {
init: {loadMaps: false, debug: true},
write: {addComment: false},
destPath: '../maps' // this is the string "maps" by default
}
}
}
}
main: {
scripts: [
'./*.js'
],
styles: [
'./*.css'
],
options: {
pluginOptions: {
'gulp-sourcemaps': {
init: {debug: true},
write: {addComment: false},
destPath: '../maps',
scripts: {
init: {loadMaps: false},
write: {addComment: true} // overrides {addComment: false}
},
styles: {
init: {loadMaps: true},
destPath: 'maps' // overrides '../maps'
}
}
}
}
} Let me know if you'll be able to look into these items or have different ideas |
Yeah, this seams all quite reasonable. I will get this sorted tonight and update the PR. |
I have updated this pull request with the suggested chnages. |
var sourcemapBaseOpts = defaults({}, bundle[BundleKeys.OPTIONS].pluginOptions['gulp-sourcemaps']); | ||
// Remove the style and script sub attributes | ||
delete sourcemapDefaults[BundleKeys.SCRIPTS]; | ||
delete sourcemapDefaults[BundleKeys.STYLES]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you mean sourcemapBaseOpts
here instead of sourcemapDefaults
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, i thought i had fixed that typo sorry. I had fixed that one localy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np, I just quick fixed it and merged with my changes
this change has landed in |
please try it out and let me know if there are any issues |
As per issue #64
Currently this both the options for sourcemap.init and sourcemap.write compressed into the same option.
I can't see any option conflicts upstream, so I don't think this would be an issue.