-
Notifications
You must be signed in to change notification settings - Fork 296
Svg sprite plugin #762
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
base: main
Are you sure you want to change the base?
Svg sprite plugin #762
Conversation
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.
@zoran995 that looks good. I have requested a couple of changes.
<link | ||
rel="apple-touch-icon" | ||
sizes="57x57" | ||
href="favicons/apple-icon-57x57.png" | ||
/> |
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.
are these formatting changes from prettier?
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.
Yes, I don't think this file was prettified before
options: { | ||
esModule: false, | ||
symbolId: (svgPath) => { | ||
namespace: (svgPath) => { |
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.
This namespace
function is currently returning a new name for each icon in the plugin. It should instead just return the package name, something like: namespace: (svgPath) => packageNames[svgPath] || "terriajs-plugin"
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.
Thanks for catching this. It was definitely not intended
buildprocess/webpack.config.js
Outdated
var args = minimist(process.argv.slice(2), { | ||
string: ["baseHref"], | ||
default: { baseHref: "/" } | ||
}); |
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 think it is better to be explicit here and pass these in as parameters instead of reading directly from argv
.
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.
Moved argv processing to the gulpfile
Depends on TerriaJS/terriajs#7689