lihaoyi / hands-on-scala-js

Better documentation for Scala.js
143 stars 52 forks source link

Replace requiresDOM by 'jsDependencies += RuntimeDOM' #4

Closed sjrd closed 9 years ago

sjrd commented 9 years ago

requiresDOM is deprecated in favor of jsDependencies += RuntimeDOM. There are more info on this in Step 6 of the tutorial.

sjrd commented 9 years ago

Well, technically requiresDOM is not deprecated, it just overrides the default that is derived from the presence of RuntimeDOM in the transitive dependencies. Still, RuntimeDOM (or RuntimeDOM % "test") should be preferred, usually.

lihaoyi commented 9 years ago

How would you explain it though? A newcomer wouldn't want to care about settings or all that stuff. Maybe just saying "if you depend on scala-js-dom, it'll use PhantomJS" will be enough.

sjrd commented 9 years ago

Yes, you don't need to explain how it works or what it does exactly. You can basically keep all your current explanations intact. Just change the line of code. The text need not change.

lihaoyi commented 9 years ago

Fixed. Note I didn't test this at all, I just take your word that it works =P