I have a complex project and I have multiple entry point. I was manually running dart2js, but I'm trying to use aync_await library. The library require the the transformer async_await. The problem is that dart2js doesn't automatically run the transformer. Is there a way to specify dart2js to run a transformer or to manually run the transformer?
I tried pub build, but it so broken, I can't get anywhere. For example, I can't ask it to just compile a dart file. It compile the whole project into a build directory. This works for the web directory, but I have a directory for my server which need to be compiled to js too and a test directory.
EDIT:
To inline my answer to Günter Zöchbauer.
I have the following structure:
root
|-- packages
| |-- async_await (github.com/dart-lang/async_await)
| \-- ...
|-- node_modules
|-- build (auto generated by pub build)
| \-- web
| \-- ...
|-- server
| |-- main.dart
| \-- main.js
|-- test
| |-- main_unittest.dart
| \-- main_unittest.js
|-- web
| |-- index.html
| \-- index.dart
|-- package.json (this is required to be in the root because of heroku)
|-- Procfile (this is required to be in the root because of heroku)
\-- pubspec.yaml
Constraints:
1) I'm using heroku, because of that, i'm force to have "node_modules", "Procfile" and "package,json" in the root.
2) Because of pub, I'm force to have web directory and only one "pubspec.yaml" in the projet. Having multiple one, make the editor choke/hang.
3) I'm compiling to nodejs
So my problem is that my test suite and my server can't be compiled using pub build. Also, I hate having a build directory. When I'm running Dartium and I'm making change, I have to run pub build just to have it copy my change from the directory root\web to root\build\web or temporally make my server point to root/web.
I was running dart2js manually, but with async_await, I have to find an another way of doing so I can run async_await transformer. So as of now, I can't run the server, neither my testbench with async_await.