donpark / html2jade

Converts HTML to Jade template. Not perfect but useful enough for non-daily conversions.
MIT License
1.18k stars 157 forks source link

Update package.json to support windows installs #26

Closed analogt closed 12 years ago

analogt commented 12 years ago

Hey Don, I think if you update main to "index" it will support windows installs in npm.

donpark commented 12 years ago

After manually merging the change and uploading latest version to NPM registry, I realized why this setting main to mystery value 'index' works.

In bin/html2jade file:

var html2jade;
try {
    html2jade = require('html2jade');
} catch(err) {
    html2jade = require('../lib/html2jade');
}

With main set to index, first require relying on default module path fails, causing second require with relative path to kick in. Second require is there for my testing purpose.

So this appears to be a temporary solution until I can figure out why the first require is failing.