craigspaeth / nap

Compile, manage, & package stylesheets, javascripts, and javascript templates for node.js
MIT License
122 stars 33 forks source link

Fix for colliding fingerprints. #40

Closed henrit closed 11 years ago

henrit commented 11 years ago

Currently fingerprintForPkg is applied to the source asset files, before any preprocessors are applied. This breaks Stylus files, since they can import content from other files, resulting in a different processed file when the source assets nap knows about haven't changed.

Fingerprints should be generated against the final versions of the file.

This patch does that. As a side effect, it enforces that nap.package() must be called before production assets can be used.

(also clean up to using "hogan.js" as a dependency rather than "hogan" since that's what npm knows.) (unit tests claiming mode:"production" have been updated to call nap.package() consistently.)

craigspaeth commented 11 years ago

Awesome, thank you for this!