Closed Flet closed 9 years ago
Looking deeper at this, I think the template change would really just be package.json
... and with full mustache
now, we may be able to achieve this in a single file.
If we decide to add default test.js
/index.js
(in #14), we would have to think about how to deal with it... separate templates or more conditionals (or go bananas with something like recast heh).
This might be a little out of scope for now -- I think module-init is pretty close to doing everything it was designed to do. Adding transpilation build tools is venturing into the land of yeoman style generators (as opposed to just the bare bones boilerplate usable by any node module). That said, I like the idea of a module-init-next or something like that.
Cool! Thanks for the clarification!
Noticed this the other day, may be useful/interesting: https://github.com/yoshuawuyts/copy-template-dir
Yeah this is cool for sure! It only does replacement though, so conditional stuff would need to be rethought.
Is there any interest in adding another option to
module-init
to initialize a module structured to be written in ES2015 and using transpilation bybabel
?This little boilerplate seems to cover the standard practices for transpiled packages: https://github.com/vinniegarcia/es6-module-starter - it includes a lot of extra non-ES2015 stuff that is not pertinent, but you get the idea.
The biggest structural change is all code being in
/src
and being transpiled to/dist
, with thepackage.json
pointing todist/index.js
for the "main" attribute.The the directory layout may be different enough to warrant a totally separate CLI package (
module-init-next
??), but it could also be achieved here with enough work (separatetemplates
directory?).I guess it depends on @ngoldman's vision for this module. Any thoughts?