MegaPhysics / megaphysics.github.io

A Physics wiki (sort of).
megaphysics.github.io
GNU General Public License v2.0
1 stars 2 forks source link

Use ordered manifest files for site-wide js and css #57

Closed hmac closed 10 years ago

hmac commented 10 years ago

Uses imports.js and imports.css to specify assets to be included. These files have import blah.js statements that cause a file in the same directory to be included.

The directory structure is changed to: assetssite_assetsjs assetssite_assetscss (I left the bootstrap fonts alone because I don't know how they get used anyway).

CSS and JS get minified if they aren't already, and they get added into the final file in the exact order that the import statements appear. You can also put extra js/css in the import files themselves if you really want to.

hmac commented 10 years ago

Oh also I added fastclick for the dropdown which makes it much more responsive on mobile safari

drewsberry commented 10 years ago

What do mangle=True and mangle_toplevel=True do?

drewsberry commented 10 years ago

Also, is there any reason you've imported megaphysics.css, instead of megaphysics.min.css?

drewsberry commented 10 years ago

I like the compile_js and compile_css. Very symmetric.

hmac commented 10 years ago

I think the mangle just mucks about with the code a bit more, maybe to make it smaller? Not sure, it was in the example from the module.

And I don't see any reason to keep minified css in the assets folder. What happens when you want to edit it?