Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensibility #43

Open
chadhietala opened this issue Apr 9, 2017 · 0 comments
Open

Extensibility #43

chadhietala opened this issue Apr 9, 2017 · 0 comments

Comments

@chadhietala
Copy link
Member

chadhietala commented Apr 9, 2017

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant