We have a generic templating tool here that's not builder specific, so let's move that to it's own project
[x] Move all of lib/ to new project.
[x] Move the bin/builder-init.js logic to a lib/ library and leave a very small shell.
[x] Take default prompts values as an argument to executor in new project.
[x] Proposal: Make all tool-provided automatic values prefaced with an _. So, e.g., instead of eslint, npmignore, etc. we'd have _eslint, _npmignore, etc. in new tool
[ ] Deprecate eslint, npmignore, etc. in builder-init and provide transition aliases and documentation.
[ ] Open Question: Make destination into _destination and just another normal field that if empty blows up?
New list of proposed default fields:
/**
* Default prompts values added to all prompt calls.
*/
var DEFAULTS = {
destination: {
message: "Destination directory to write",
validate: function (val) { /* existing stuff */ }
},
derived: {
// Existing renamed file name helpers.
_npmignore: function (data, cb) { cb(null, ".npmignore"); },
_gitignore: function (data, cb) { cb(null, ".gitignore"); },
_eslintrc: function (data, cb) { cb(null, ".eslintrc"); },
_npmrc: function (data, cb) { cb(null, ".npmrc"); }
// New stuff
//
// Location of templates directory to use.
// Default to `init` for `builder-init`. Could be anything for new project.
// https://github.com/FormidableLabs/builder-init/issues/36
_templatesDir: /* snipped */
}
};
We have a generic templating tool here that's not
builder
specific, so let's move that to it's own projectlib/
to new project.bin/builder-init.js
logic to alib/
library and leave a very small shell._
. So, e.g., instead ofeslint
,npmignore
, etc. we'd have_eslint
,_npmignore
, etc. in new tooleslint
,npmignore
, etc. inbuilder-init
and provide transition aliases and documentation.destination
into_destination
and just another normal field that if empty blows up?New list of proposed default fields:
/cc @kenwheeler