jnordberg / wintersmith

A flexible static site generator
http://wintersmith.io/
MIT License
3.5k stars 335 forks source link

Remove node-optimist dependency #258

Closed phippg closed 9 years ago

phippg commented 10 years ago

Usually Wintersmith just returns "something - no such command". When executing wintersmith version it throws a TypeError.

/usr/lib/node_modules/wintersmith/node_modules/optimist/index.js:150
            if (opt.alias) self.alias(key, opt.alias);
                   ^
TypeError: Cannot read property 'alias' of undefined
    at Object.Argv.self.option.self.options (/usr/lib/node_modules/wintersmith/node_modules/optimist/index.js:150:20)
    at Object.main (/usr/lib/node_modules/wintersmith/lib/cli/index.js:63:50)
    at Object.<anonymous> (/usr/lib/node_modules/wintersmith/bin/wintersmith:3:24)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
phippg commented 10 years ago

Nevermind, it seems to be a problem with the deprecated node-optimist package.

jnordberg commented 10 years ago

Woot, node-optimist is deprecated?

phippg commented 10 years ago

Well, it has a deprecation notice in the readme and points to minimist created by the same guy.

jnordberg commented 10 years ago

Right, i'll make a point to remove it in the future. Strange that it should start acting up now, i guess keeping the version more strict for it should help.

jnordberg commented 10 years ago

Replacement:

https://github.com/trentm/node-dashdash

jnordberg commented 10 years ago

(updated title)

phippg commented 10 years ago

nomnom looks very lightweight and usable as well. About 500 SLOC with the possibility to define commands right away.

But in the end I don't have any experiences so I'll leave that to other people