-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
I'd suggest that webpacker follow the JavaScript, CSS, Images, Fonts organization that we've used for React on Rails. It's really quite simple:
- All client-related files go under a top level directory called
/client
Over the past 1.5+ years, we've found this setup to be extremely popular with our community. This setup has several advantages:
- Client-side specialists can use a client-side editor, such as Atom or Webstorm and simply open the
/clientdirectory. Under the current structure, one open the "javascript" folder, but then several key files, such as thepackage.json,node_modules, and webpack configs are not accessible. - Client side linting and testing is more cleanly organized.
- Backend specialists can have their editor ignore the
/clientdirectory. - The problem of having the node_modules be outside the top level is easily solved by having a minimal package.json like this. The
postinstallscript will dig into the/clientdirectory and runyarn.
{
"private": true,
"scripts": {
"postinstall": "cd client && yarn",
}
}Possibly, the server side could eventually go under /server so the number of top level directories is minimal.
hrishimittal, suusan2go, thewoolleyman, alex35mil, dzirtusss and 18 moredleavitt, artemgurzhii and aadityataparia
