node-build icon indicating copy to clipboard operation
node-build copied to clipboard

[WIP] Build build in ... build

Open schwers-zz opened this issue 9 years ago • 0 comments

WIP PR to get some early thoughts on building build in build. Other than maximizing the ratio of build to words that aren't build in the pr title, the goal here is to make developing build easier. By writing build in es6+ like the rest our our repos there will be less of a paradigm shift when writing javascript, as well as access to niceties like splats (e.g. {...builds, ...extensions}), async / await, class, etc. We can also take advantage of better code lint'ing (which gives us no-unused-vars, let/const, no-undefined-vars, and etc checks at lint time).

Some notable changes:

  • The source for bin/buildBlueprints was moved to src/blueprints as the bin/ file is now compiled by blueprints
  • Generators (/lib/generators/index.js) now have a more defined structure. This is a part that makes me hesitant that its ready, I'm considering making them always have a function that produces an object to be used in the webpack config, instead of objectOrFunction as it is now. I'd also be open to making them a class, but I've been trying to avoid those.
    • Depends on a commit to add a new plugin to build (https://github.com/schwers/node-build/commit/2bef8806fea324147cfd38bdf12834bff201932a).

Other thoughts:

  • Might be good to include a script to bump the package version, and bump the devDependency of @r/build to the former latest version of build.
  • Taking a step back, I didn't want to re-write or change the api for blueprints too much as part of this patch, but I think by making development easier we're better positioned to do so.

schwers-zz avatar Jun 03 '16 19:06 schwers-zz