harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
37 stars 30 forks source link

Stop "npm run serve" overwriting webpack-stats.json #1808

Closed jcushman closed 2 years ago

jcushman commented 2 years ago

Friday funday coding project! A small quality of life improvement to stop fab run_frontend from overwriting webpack-stats.json. This is a second attempt at #1732. I called the new stats file webpack-stats-serve.json to emphasize that it's the file created by running npm run serve instead of npm run build, and added a LIVE_JS_ASSETS environment variable (set by fab run_frontend) to tell Django that it should look for live assets from npm run serve instead of built assets from npm run build.

Note, I think it might be considerably clearer to call this file vue-bundle-paths.json (and vue-bundle-paths-serve.json) instead of webpack-stats.json. But that seemed confusing to mix in here, so, eh, something to consider.

codecov-commenter commented 2 years ago

Codecov Report

Merging #1808 (2413641) into develop (ae88018) will not change coverage. The diff coverage is 33.33%.

@@           Coverage Diff            @@
##           develop    #1808   +/-   ##
========================================
  Coverage    76.87%   76.87%           
========================================
  Files           46       46           
  Lines         6418     6418           
========================================
  Hits          4934     4934           
  Misses        1484     1484           
Impacted Files Coverage Δ
web/fabfile.py 24.22% <33.33%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.