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

rewrite compiler as barback transformers #12511

Closed
sigmundch opened this issue Aug 16, 2013 · 3 comments
Closed

rewrite compiler as barback transformers #12511

sigmundch opened this issue Aug 16, 2013 · 3 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug
Milestone

Comments

@sigmundch
Copy link
Member

Rewrite the polymer compiler as a set of barback transformers, so they can be used for pub serve and pub deploy.

See attached diagram for the current design idea. We still need to add a few more transformers (e.g. optimizations to do scoped css at compile-time for example).

I've started already with this approach, here is the current status:
 - observe transform (done, see observe package)
 - inline code extractor (started)
 - html import inliner (started)
 - script compactor (started)
 - dart2js transform (rnystrom has started, blocked by some refactoring changes in dart2js)


Attachment:
[polymer serve-deploy architecture.png](https://storage.googleapis.com/google-code-attachments/dart/issue-12511/comment-0/polymer serve-deploy architecture.png) (14.58 KB)

@sigmundch
Copy link
Member Author

the following transformers are now submitted in the Dart repo:
 - inline code extractor (done)
 - html import inliner (done)
 - script compactor (done)

We've added a deploy script that uses transformers to create the output of a project.

Next:
  - delete old compiler code (I've started with this, it will take some time because some pieces were not ported over initially and need to be ported)
  - add transformers for css
  - simplify the analyzer code (remove analysis work that was only necessary for codegen)

@sigmundch
Copy link
Member Author

Marked this as blocking #12814.

@sigmundch
Copy link
Member Author

update:
 - the old compiler code is gone
 - the analyzer turned into a linter
 - build.dart now invokes the linter and optionally the deploy code.

I'll close this bug and add a new bug on adding the rest of the css transformers.


Added this to the M7 milestone.
Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants