-
Notifications
You must be signed in to change notification settings - Fork 35
Figure out how to deal with favicon/apple icons etc. #78
Comments
yeah. Do we need a nicer hook into the asset system? |
Possibly. Btw, check out jantimon/html-webpack-plugin#41. It feels like we could get a lot of features pretty much for free if we integrated This would mean you would define a base template as a user for more advanced usage. We probably want to give it some thought before jumping into a solution but it's good have these kind of options. |
Very interesting! |
Unfortunately https://github.com/haydenbleasel/favicons does not work offline |
Yeah, that online requirement sucks. Using imagemagick bindings (unmaintained) a basic function toIco(input, output, cb) {
im.convert([input,
'-resize', 'x16',
'-gravity', 'center',
'-background', 'transparent',
'-crop', '16x16+0+0',
'-colors', '256',
'-flatten',
output
], cb);
} It's probably easy to port to gm, a GraphicsMagick wrapper that seems to be maintained. @eldh Given these operations are async maybe it would make sense to change |
Will we gain anything in the end by making it async? In that case maybe all hooks should be async? If we use babel it should be fairly easy to do it with async functions? |
That var pluginExtras = _.pluck(config.plugins, 'extra').filter(_.identity);
var extraFiles = _.map(pluginExtras, function(plugin) {
return plugin(params.allPaths, config);
}); Technically speaking it would just become I don't see any need to make all of the hooks async yet. Maybe someday but I can't think of a use case for that yet. This particular hook is an exception because the dependencies we might want to use here can be async by nature. I wouldn't worry about babel yet. It's likely best to leave it out of Node code for now to keep things simple. |
I pushed the problem to user level. Now you can override entire |
I suppose this should be a plugin. See https://github.com/haydenbleasel/favicons . Ideally we would just wrap that.
The text was updated successfully, but these errors were encountered: