typescript-ruby / typescript-rails

An asset pipeline wrapper for the TypeScript language
MIT License
255 stars 29 forks source link

expire root TS cache in response to change in referenced `.ts` files #24

Closed wtmcc closed 9 years ago

wtmcc commented 9 years ago

This PR is intended to fix the undesirable behavior described in issue #23 by the approach I propose there. See that issue for context.

Here, I introduce a step into the TS compiler wrapper that recurses through all referenced files and tells its Sprockets::Context that the TS file being processed depends_on each file listed as a reference in the TS idiom.

I may have overlooked an easy fix, and Ruby’s not my native language, so feel free to suggest stylistic or other changes! I’m eager to help, and solve our local dev env woes for good. Thanks.

Will

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.58%) to 97.33% when pulling fda85ef83a1b1e412dd8eb3fc52d9ad76759c9c0 on wtmcc:depend-on-references into cef909f84bdb5c61b96895841986e0d92750915f on typescript-ruby:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.27%) to 98.18% when pulling 7c4e15bdf4b3b0f450930368bf430d9b69aea4b0 on wtmcc:depend-on-references into cef909f84bdb5c61b96895841986e0d92750915f on typescript-ruby:master.

klaustopher commented 9 years ago

Pinging @gfx

gfx commented 9 years ago

Sorry to be late! LGTM.

vexus2 commented 9 years ago

:+1:

funnythingz commented 9 years ago

LGTM!!ありがとうございます! Thanks!!!

wtmcc commented 9 years ago

Awesome, thanks for the merge, @gfx.