socialgenius/Mandible — Issue #1: Need to edit both src/index.html and src/index_uncompressed.html?
Author: rmarscher
Created: 2011-12-07 15:38:46+00:00
State: open

Hey guys,

Cool project. Thanks for sharing.

I'm not sure if this is working as designed or if I'm doing something wrong. If I edit `src/index_uncompressed.html` it isn't automatically compiled to both `assets/index_uncompressed.html` and `assets/index.html`. It seems that I need to make changes in both `src/index.html` and `src/index_uncompressed.html` -- when using exclusively underscore templates, I suppose it's rare that you have to edit the html file... but it would probably be nice for `assets/index.html` to be generated automatically from `src/index.html`.

I think it would be a little better for there to be

/compressed
/uncompressed
/src

So you always only edit `/src`, point your development docroot to `/uncompressed`, and then production points to `/compressed`.

The uncompressed also currently has urls like `../src/js/index.js` -- if you point your docroot to the `/assets` folder then it's not possible to access `../src`. Changing to having the new "uncompressed" folder would fix that problem.

You could probably do something like this. Add `@scripts@` to `/src/index.html` on the line after `@templates@` then when generating `/uncompressed/index.html` you replace `@scripts@` with the path to each js file specified in the makefile. And when generating `/compressed/index.html` you replace `@scripts@` with ``.

I might go ahead and fork and make the changes, but I'd love to hear your thoughts.

Thanks, Rob