codeforamerica / chime

A city-focused content management system
http://chimecms.org/
BSD 3-Clause "New" or "Revised" License
35 stars 12 forks source link

Bundle and Minify JS #480

Open norrishung opened 9 years ago

norrishung commented 9 years ago

Using something like this?

http://flask-assets.readthedocs.org/en/latest/

I'm curious what the best way to do this is if you have different javascript modules across different pages.

migurski commented 9 years ago

Do we have enough JS to justify this right now?

norrishung commented 9 years ago

Not very much JS but isn't this just something you should do as a good practice no matter how much js/css you have? Definitely not a high priority but are there downsides to doing this?

migurski commented 9 years ago

Main downside I can think of is that it introduces a build step where one might not be needed. I’m a fan of serving JS & CSS unmodified until they get too big, because I think it’s easier to reason about when debugging in-browser.

darvelo commented 9 years ago

One of the positives to going the route of #531 is that JS can be compiled with sourcemaps that ease debugging and separate modules at the same time. A very convenient time-saver all around.