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

Change directory structure #2

Closed
wants to merge 1 commit into from
Closed

Change directory structure #2

wants to merge 1 commit into from

Conversation

itkrt2y
Copy link
Contributor

@itkrt2y itkrt2y commented Dec 7, 2016

I think that app/packs/javascripts is closer to the Rails way of naming things, rather than app/javascript/packs/. Also, app/packs/javascripts is more future-proof, as it will let us add other assets, for example stylesheets under app/packs/stylesheets/.

@dhh
Copy link
Member

dhh commented Dec 7, 2016

I'll explain this properly in the README. But the intention is that app/javascript is where all your app-like JS lives. Within that, we just use packs/ as a convention to create entry targets for webpack. So whatever you put in packs/ is what you want to have compiled via webpack as an entry. Every bit of "real code" should just live in app/javascript, like app/javascript/calendar/index.js or whatever.

@dhh dhh closed this Dec 7, 2016
@itkrt2y
Copy link
Contributor Author

itkrt2y commented Dec 7, 2016

Thanks, I understand.

Only one more thing, I think it would be better to use plural name like app/javascripts/ than app/javascript/.
What do you think about it? @dhh

@dhh
Copy link
Member

dhh commented Dec 7, 2016

I went with app/javascript specifically to highlight the difference to app/assets/javascripts. To me, JavaScripts is great when you consider these things just that: A collection of independent scripts. Kinda what we call sprinkles.

But for this, we're building systems, not individual scripts. Kinda like if we did app/ruby rather than app/rubies.

Hope that makes sense.

@itkrt2y
Copy link
Contributor Author

itkrt2y commented Dec 8, 2016

OK, now I totally understand. Thanks a lot!

@itkrt2y itkrt2y deleted the change-directory-structure branch December 8, 2016 07:04
jasonfb added a commit to jasonfb/webpacker that referenced this pull request Nov 20, 2021
guillaumebriday pushed a commit that referenced this pull request Dec 28, 2021
…fest::MissingEntryError (#3232)

* provides two more common errors (fix suggestions) for Webpacker::Manifest::MissingEntryError; see https://stackoverflow.com/questions/52639256/webpackermanifestmissingentryerror

* puts back old veribalge for #4 (was #2)  instead of

* removing reference to npm
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.

None yet

2 participants