jeremyruppel / walrus

A bolder kind of mustache
http://documentup.com/jeremyruppel/walrus/
MIT License
215 stars 10 forks source link

Update package.json for use with node #27

Closed kagd closed 12 years ago

kagd commented 12 years ago

I was in the process of trying to add the walrus rendering engine to consolidate.js for easy use within express but kept running into issues where .parse() was undefined. After a bunch of trial and error I discovered that it was because require('walrus') was not actually loading walrus. It wasn't loading walrus because the package.json was not pointing to the compiled file, it was pointing to the working directory.

To test this out locally before accepting this pull request, you can duplicate this issue by creating a simple node app and just call var walrus = require('walrus'). This should throw an error, but if you update the main path to bin instead of lib, it will load up correctly.

jeremyruppel commented 12 years ago

Brilliant! Thanks for this. Forgot to update the package.json after a recent refactor of the export style (3bf6830b9d07198d5383215f17db10be9cc2e38d). Appreciate the help.

kagd commented 12 years ago

Glad to help. I have used a couple of other template engines, by far this beats them. Great syntax. I am in the process of getting :titleize working and I do have a couple of questions.

  1. When I ran cake all, git showed that parser.js had a bunch of changes from the previous version. Just curious if everything is supposed to be compiled when each feature and bug fix is done, or just on version numbers?
  2. How long till changes are pushed to npm?
jeremyruppel commented 12 years ago
  1. Yeah, I've seen that before. For some reason, jison seems to compile slightly differently for different systems, sometimes it's as petty as single vs double quotes. Would love to know the reason behind this, but really as long as the specs are passing I think it's fine.
  2. Just published. Overwrote v0.8.2 to include your package.json fix.
kagd commented 12 years ago

Thanks for the quick response and npm publish.

Good to know about the jison compilation. Definitely strange that it functions differently on different systems. That almost seems like a bug in jison. Oh, well.

Thanks again.