gjtorikian / biscotto

UNMAINTAINED. CoffeeScript API documentation tool that uses TomDoc notation.
https://gjtorikian.github.io/biscotto/
MIT License
105 stars 18 forks source link

Haml-coffee error on Windows #32

Closed adam-lynch closed 10 years ago

adam-lynch commented 10 years ago

I'm testing doc generation on Windows. This my file:

require('coffee-script/register');
var biscotto = require('./src/biscotto');

biscotto.run();

I get the following error:

undefined:25
$o.push("  " + $c(this.JST['partials/head'](this)));
                                           ^
TypeError: Object  has no method 'partials/head'
  at Object.eval (<anonymous>:25:44)
  at Array.frames (C:\wamp\www\GitHub\biscotto\node_modules\haml-coffee\src\hamlc.coffee:53:26)
  at Templater.module.exports.Templater.render (C:\wamp\www\GitHub\biscotto\src\util\templater.coffee:56:12)
  at Generator.module.exports.Generator.generateIndex (C:\wamp\www\GitHub\biscotto\src\generator.coffee:68:16)
  at Generator.module.exports.Generator.generate (C:\wamp\www\GitHub\biscotto\src\generator.coffee:36:6)
  at C:\wamp\www\GitHub\biscotto\src\biscotto.coffee:237:21
  at C:\wamp\www\GitHub\biscotto\node_modules\async\lib\async.js:533:17
  at C:\wamp\www\GitHub\biscotto\node_modules\async\lib\async.js:119:25
  at C:\wamp\www\GitHub\biscotto\node_modules\async\lib\async.js:24:16
  at C:\wamp\www\GitHub\biscotto\node_modules\async\lib\async.js:530:21
  at C:\wamp\www\GitHub\biscotto\src\biscotto.coffee:331:7
  at ChildProcess.exithandler (child_process.js:635:7)
  at ChildProcess.EventEmitter.emit (events.js:98:17)
  at maybeClose (child_process.js:735:16)
  at Socket.<anonymous> (child_process.js:948:11)
  at Socket.EventEmitter.emit (events.js:95:17)
  at Pipe.close (net.js:466:12)

Changing the references from partials/* to ./partials/* doesn't change the result.

It might be something to do with haml-coffee#90 but as defined in the package.json, my coffee-script version is 1.6.2. 1.6.3 doesn't help either. I tried upping the haml-coffee version from 0.6.0 to 1.14.1 (mentioned in that issue) but still no luck.

cc @nathansobo

adam-lynch commented 10 years ago

Wait, I might've jumped the gun there in thinking it's related to haml-coffee#90.

adam-lynch commented 10 years ago

Could someone comment on this?

Since Atom is going to support Windows, will this be sorted too?

I plan on using biscotto on a few projects (starting now) via a gulp-biscotto (GulpJS) plugin I'd create for it.

It seems like a small problem. I think the parsing and everything is fine but it's just a small bug in rendering the templates, the last step.

nathansobo commented 10 years ago

@gjtorikian Any thoughts on this?

gjtorikian commented 10 years ago

Sorry for not getting to this, I was away on vacation.

@adam-lynch It took me a while to set up my Windows VM and this project but I finally got it working and reproduced the problem. I've got a fix, will close this out and publish the new Biscotto :soon:.

adam-lynch commented 10 years ago

Thanks @gjtorikian :). Will try soon.

adam-lynch commented 10 years ago

@gjtorikian This fix doesn't seem to be published to npm.

gjtorikian commented 10 years ago

@adam-lynch Whoops! Right you are! I've just pushed to 2.1.2.