Skip to content

Assets from Gems Section #1

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

Closed
wants to merge 2 commits into from
Closed

Assets from Gems Section #1

wants to merge 2 commits into from

Conversation

hummusonrails
Copy link

@hummusonrails hummusonrails commented Dec 13, 2020

Adding a guide for Webpacker is so important, and the work here is fantastic! 💙

I've gone ahead and introduced a Troubleshooting section, which Noel had prepared an area for in his first take on this. In the section I added one topic on addressing assets from Gems with Webpacker, and laid out the most common approaches currently that I've discovered in my research. This was an area we struggled with quite a bit at work as we have begun finishing the migration of our assets to Webpacker and would love to spare others in the future some time by adding a bit on it here.

Thanks for considering!

Specifically, this PR:

  • Adds a troubleshooting top-level section
  • Adds a guide to the current options for addressing assets from Gems with Webpacker

EDIT: After the first revision, I've gone ahead and moved the topic to its own section and removed the proposed Troubleshooting section.

* Add a troubleshooting top-level section
* Add a guide to the current options for addressing assets from Gems with Webpacker
@rossta
Copy link
Owner

rossta commented Dec 14, 2020

@bencgreenberg Thanks for this PR! A few comments:

  • I'd say we can make this its own section separate from Troubleshooting. What do you think?
  • Though it may be the case that there is currently no agreed-upon best practice—to elablorate on my tweet from earlier—I'm inclined to start by putting forth a single recommended best practice as part of the guide, which, in my opinion, would be the first of the options you've presented (separate NPM packages). If you agree, could you reword and point to some examples? (Webpacker itself comes to mind)

@hummusonrails
Copy link
Author

  • I'd say we can make this its own section separate from Troubleshooting. What do you think?

Sure, that sounds like a good idea!

  • Though it may be the case that there is currently no agreed-upon best practice—to elablorate on my tweet from earlier—I'm inclined to start by putting forth a single recommended best practice as part of the guide, which, in my opinion, would be the first of the options you've presented (separate NPM packages). If you agree, could you reword and point to some examples? (Webpacker itself comes to mind)

While I do think that ought to be the recommended approach, it doesn't, however, do much for those who are not the gem owner. I don't think I'd want to recommend that people take the assets from a gem they don't maintain and on their own publish them as an NPM package. I also wouldn't want to tell people to start banging down the door of every gem maintainer and asking them to publish NPM packages, either. That might not get a lot of appreciation from all the hard working maintainers out there! That's why I'm inclined to include at least one other option as well.

* Moved assets from gems section from troubleshooting into its own section
* Added an example of the preferred approach
@hummusonrails hummusonrails changed the title Add Troubleshooting Section Assets from Gems Section Dec 15, 2020
@hummusonrails
Copy link
Author

Good morning @rossta, anything I can do to help move this forward? 🙏🏻

@hummusonrails
Copy link
Author

Hi @rossta, it seems your PR was merged into Rails a little while ago, so I'm going to go ahead and close this PR in your branch. Have a great day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants