Using webpacker in spite of disliking some of its
specific choices (cough yarn cough) for the sake
of cleaving to Rails standards; the newest version
also adds the ability to recompile assets on page
reload rather than running a separate webpack process
which should make new-developer onboarding simpler.
Added standard as our base ESLint config because
I personally like it better than AirBNB or Prettier;
I care less which linter config we use than that we
use a prefab one and am open to alternate suggestions.
Haven't added any specific JS or CSS framework stuff
here yet as I would specifically like to use a low-
or no-framework approach on this project. (Faster
load time => more subscription conversions.)
I've slung the Webpack stuff in app/assets -- this is
distinct from the default behavior, which is
app/javascript. I find app/javascript misleading for
a directory that will also contain SCSS, image assets,
etc. I find app/assets easier to understand because
that's where frontend stuff goes in Rails projects, but
am worried it may mislead or confuse people who are
expecting to see Sprockets stuff there. Feedback
specifically requested on this point.
Apologies for the ginormous PR size; most of it is a
5.9 KLoC (!!!) yarn.lock file.
There was a small bug in the setup script that I resolved; but otherwise I think this is good to go, unless you want to think about the two questions I left.
Using
webpacker
in spite of disliking some of its specific choices (coughyarn
cough) for the sake of cleaving to Rails standards; the newest version also adds the ability to recompile assets on page reload rather than running a separate webpack process which should make new-developer onboarding simpler.Added
standard
as our base ESLint config because I personally like it better than AirBNB or Prettier; I care less which linter config we use than that we use a prefab one and am open to alternate suggestions.Haven't added any specific JS or CSS framework stuff here yet as I would specifically like to use a low- or no-framework approach on this project. (Faster load time => more subscription conversions.)
I've slung the Webpack stuff in
app/assets
-- this is distinct from the default behavior, which isapp/javascript
. I findapp/javascript
misleading for a directory that will also contain SCSS, image assets, etc. I findapp/assets
easier to understand because that's where frontend stuff goes in Rails projects, but am worried it may mislead or confuse people who are expecting to see Sprockets stuff there. Feedback specifically requested on this point.Apologies for the ginormous PR size; most of it is a 5.9 KLoC (!!!)
yarn.lock
file.