bdkjones / CodeKit-1-Old

146 stars 1 forks source link

v1.6.2 failed on markdown in jade?!?! #604

Open bigfat opened 11 years ago

bigfat commented 11 years ago

just as subject

bdkjones commented 11 years ago

sigh another update, another issue with Jade. Please send me an example file I can test with. Thanks!

Sent from my iPhone

On May 23, 2013, at 14:53, bigfat notifications@github.com wrote:

just as subject

— Reply to this email directly or view it on GitHub.

bigfat commented 11 years ago

here's attached example jade.

anyway i've solve this temporarily, by force CodeKit using /users/me/node_modules/jade/bin/jade

(sorry i dunno how to check the version number, i'm not familiar with these stuff...)

thank you for soon reply!

On 2013年5月24日Friday at 上午6:23, bdkjones wrote:

sigh another update, another issue with Jade. Please send me an example file I can test with. Thanks!

Sent from my iPhone

On May 23, 2013, at 14:53, bigfat <notifications@github.com (mailto:notifications@github.com)> wrote:

just as subject


Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub (https://github.com/bdkjones/CodeKit/issues/604#issuecomment-18375699).

bigfat commented 11 years ago

sorry! just sent a wrong jade file, please use this newest attachment.

On 2013年5月24日Friday at 上午6:31, 姜丁坤 wrote:

here's attached example jade.

anyway i've solve this temporarily, by force CodeKit using /users/me/node_modules/jade/bin/jade

(sorry i dunno how to check the version number, i'm not familiar with these stuff...)

thank you for soon reply!

  • dp

On 2013年5月24日Friday at 上午6:23, bdkjones wrote:

sigh another update, another issue with Jade. Please send me an example file I can test with. Thanks!

Sent from my iPhone

On May 23, 2013, at 14:53, bigfat <notifications@github.com (mailto:notifications@github.com)> wrote:

just as subject


Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub (https://github.com/bdkjones/CodeKit/issues/604#issuecomment-18375699).

Attachments:

  • example.jade
maniacyak commented 11 years ago

I'm seeing this issue too, specifically when attempting to include an HTML file. Here's the error message from CodeKit:

/Applications/CodeKit.app/Contents/Resources/engines/jade/lib/runtime.js:174
  throw err;
        ^
TypeError: (redacted).jade:69
    67|         .watch-list-sidetab
    68| 
  > 69| include footer.html

Object #<Object> has no method 'exists'
    at Object.Parser.parseInclude (/Applications/CodeKit.app/Contents/Resources/engines/jade/lib/parser.js:493:19)
    at Object.Parser.parseExpr (/Applications/CodeKit.app/Contents/Resources/engines/jade/lib/parser.js:241:21)
    at Object.Parser.parse (/Applications/CodeKit.app/Contents/Resources/engines/jade/lib/parser.js:133:25)
    at parse (/Applications/CodeKit.app/Contents/Resources/engines/jade/lib/jade.js:100:62)
    at Object.exports.compile (/Applications/CodeKit.app/Contents/Resources/engines/jade/lib/jade.js:161:9)
    at /Applications/CodeKit.app/Contents/Resources/engines/jade/bin/jade:144:23
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

Codekit -> About reports Jade as 0.30.0, but a quick folder diff suggests CodeKit.app/Contents/Resources/engines/jade/lib/filters.js is very different from the version on GitHub, and lacks the following:

filter.exists = function (name, str, options) {
  return typeof filter[name] === 'function' || transformers[name];
};

HTH

bdkjones commented 11 years ago

Yep. This is a known issue because Jade completely changed how it deals with "filters" in 0.30.0. I'm working on a workaround for Jade's new crazy approach. In the meantime, you can get this working by installing Jade at the command line (along with markdown, less, coffeescript or whatever language you're trying to import) and then switching CodeKit to use that external Jade compiler --> Preferences > Languages > Jade > Advanced Compiler Settings