Skip to content

Commit

Permalink
Build script now depends on pub build to do dart2js
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Persson committed Oct 14, 2015
1 parent 892f328 commit 4aaa654
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/src/cli/program.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,8 @@ class BridgeCli extends Program {
@Command('Build the projects client side assets using [pub build]')
build() async {
final commands = [];
final public = new Directory(app.config('http.server.public_root', 'web'));
final build = new Directory(app.config('http.server.build_root', 'build'));
commands.add(_run('pub', ['build', '-o', build.path]));
final List<File> files = await public
.list(recursive: true, followLinks: false)
.where((e) => e.path.endsWith('.dart')).toList();
for (final file in files)
commands.add(
_run('dart2js', [
'-m',
'-o',
path.join(build.path, '${file.path}.js'),
file.path,
]));
await Future.wait(commands);
}

Expand Down

0 comments on commit 4aaa654

Please sign in to comment.