Last active
May 1, 2017 05:07
-
-
Save thosakwe/2fc618e55841115229ef39b0c31ef201 to your computer and use it in GitHub Desktop.
Angular2 + build_runner???
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
... | |
<body> | |
<script src="main.g.dart" type="application/dart"></script> | |
<script src="packages/browser/dart.js" type="text/javascript"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:angular2/transformer.dart'; | |
import 'package:build_barback/build_barback.dart'; | |
import 'package:build_runner/build_runner.dart'; | |
final PhaseGroup PHASES = new PhaseGroup.singleAction( | |
new TransformerBuilder( | |
new AngularTransformerGroup( | |
new TransformerOptions( | |
entryPoints: const ['web/main.dart'], | |
platformDirectives: const ['package:angular2/common.dart#COMMON_DIRECTIVES'], | |
platformPipes: const ['package:angular2/common.dart#COMMON_PIPES'] | |
) | |
), | |
const {'.dart': '.g.dart'} | |
), | |
new InputSet('foo', const ['web/**/*.dart']) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:build_runner/build_runner.dart'; | |
import 'phases.dart'; | |
main() => serve(PHASES, port: 8080, deleteFilesByDefault: true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment