I wrapped the metalsmith CLI in node-liftoff. This allows the use of a global metalsmith installation with local metalsmith.jsons without the need to install all the plugin globally, which is more convenient than the old node_module/.bin/metalsmith. It basically works like gulp.js now, where we load a local version of metalsmith when calling metalsmith from the command line.
(tests didn't stage last time -.-)
Hmm, a little wary of this because it adds a lot of complexity to understanding how the CLI works with terms like configBase and all of that.
Those names come from liftoff. I could rename a few of them (as variables) and try to add a few explaining comments. I think it would make the CLI more useful.
I'd be curious to know how much code it would take to just get the "requiring plugins locally" part that we want, without having to do all of the env, extensions, config stuff. Just cuz it seems like liftoff is trying to do too many things at once and results in a weird API.
Shouldn't be too hard, I'l check that out. Liftoff is very powerful library, looking for config files in parent folders, etc, but it might be a better idea to just extract that functionality.
CLI now tries to require local modules first
Okay, this change now just tries to find the modules in the CWD first, and falls back to the old behaviour, if the module is not found, so this is backwards compatible. @ianstormtaylor maybe it should try to require the local version of metalsmith too?
Ah damn, merged too soon. Can you add a test case for this?
Yep, I'll try to get around to that as soon as possible.
Cool, I'll wait to publish until then