Skip to content
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

Should Handlebars be a dependency? #47

Open
bentorkington opened this issue Jul 15, 2020 · 4 comments
Open

Should Handlebars be a dependency? #47

bentorkington opened this issue Jul 15, 2020 · 4 comments
Labels
dependencies Pull requests that update a dependency file question Further information is requested

Comments

@bentorkington
Copy link

Since not all users will necessarily use templating, and those that do can simply pass the output from Handlebars (or potentially some other HTML template library that might better suit their needs), should Handlebars really be a hard dependency for the package?

@frinyvonnick
Copy link
Owner

frinyvonnick commented Jul 20, 2020

Hi @bentorkington 👋,

I made this package for my own purpose I often use handlebars to make images so it removes boilerplate for me. It could be an optional dependency. If the user provides the content option without installing handlebars it could throw an error. What do you think of it?

@bentorkington
Copy link
Author

Hi @frinyvonnick 😀

Thanks for making your package available. This could work, another alternative might be to make two packages:

  1. one package with no Handlebars dependency which only performs image generation
  2. another package which is a wrapper for package 1 and uses Handlebars. Perhaps other templating engines like Nunjucks or Liquid would eventually get similar wrappers.

This would achieve the separation of concerns neatly while avoiding the error condition of not having Handlebars installed.

@frinyvonnick
Copy link
Owner

I can't make a separate package easily because of the multiple image generation. Can't figure out how to split this up while keeping this feature 🤔 Do you have an idea?

@frinyvonnick frinyvonnick added question Further information is requested dependencies Pull requests that update a dependency file labels Jul 27, 2020
@bentorkington
Copy link
Author

I'll get a PR in when I have time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants