spine / hem

Bundler for Node/CommonJS/Web Apps
MIT License
281 stars 71 forks source link

BugFix for change in jade API #83

Closed Doogiemuc closed 10 years ago

Doogiemuc commented 10 years ago

It seems that Jade has changed it's API. When I create the default spine skeleton app with spine.app, and run it with "hem server". I get the following error:

   > hem server
   Starting Server at :9294 
   Error: The `client` option is deprecated, use `jade.compileClient`
       at Function.res.toString (/usr/local/lib/node_modules/hem/node_modules/jade/lib/jade.js:164:17)
       at Object.compilers.jade (/usr/local/lib/node_modules/hem/lib/compilers.js:107:27)
       at Module.compile (/usr/local/lib/node_modules/hem/lib/stitch.js:86:33)
       at Object.<anonymous> (/usr/local/lib/node_modules/hem/assets/stitch.eco:76:105)

The little change in this pull request fixes this. Please test this bugfix thoroughly. I am quite new to coffeescript and spine.

cengebretson commented 10 years ago

I'll try to take a look at that this PR later this weekend. The one tricky part I see is developers using an older version of jade with the older api; I wonder if we need to check for compileClient first and then fall back to compile if it doesn't exist. Thanks!

cengebretson commented 10 years ago

Thanks for the catch, I went ahead and updated the compiler file so it would work with both the old and new jade api, I think that approach should work going forward... 06fb42d0e2bdabc377c9661e58e9169620395caa