Extensibility
chadhietala opened this issue · 0 comments
chadhietala commented
If we are trying to have a SSOT for how to build packages, this is going to need to have extension points. We recently refactored Ember's build pipeline to move away from emberjs-build due to the abstractness and lack of extensibility. This project should provide a base class that provides something like the following:
class GlimmerBuild {
constructor(options) {
this.targets = options.targets;
this.babel = options.babel.options;
}
typeScriptTree(tree: TypeScriptTree) {
// perform any preprocess on typescript tree
}
esNextTree(tree: ESNextTree) {
// post typescript tree / perform any pre-babel processing
}
esTree(tree: ESTree) {
// post babel tree, perform any post-processing
}
package(tree: FinalLooseTree) {
// do any packaging here
}
}
class GlimmerApplicationBuild extends GlimmerBuild {}
return new GlimmerApplicationBuild().package()