Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(943)

Side by Side Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/generator/chrome/build.dart

Issue 52573002: Remove uses of Options from pkg, samples, tests, and third_party directories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Edit comment Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core_test/src-dart/pub_package_server.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import "dart:io"; 1 import "dart:io";
2 2
3 /** 3 /**
4 * This build script watches for changes to any .dart files and copies the root 4 * This build script watches for changes to any .dart files and copies the root
5 * packages directory to the app/packages directory. This works around an issue 5 * packages directory to the app/packages directory. This works around an issue
6 * with Chrome apps and symlinks and allows you to use pub with Chrome apps. 6 * with Chrome apps and symlinks and allows you to use pub with Chrome apps.
7 */ 7 */
8 void main() { 8 void main(List<String> args) {
9 List<String> args = new Options().arguments;
10
11 bool fullBuild = args.contains("--full"); 9 bool fullBuild = args.contains("--full");
12 bool dartFilesChanged = args.any((arg) { 10 bool dartFilesChanged = args.any((arg) {
13 return !arg.startsWith("--changed=app/packages") && arg.endsWith(".dart"); 11 return !arg.startsWith("--changed=app/packages") && arg.endsWith(".dart");
14 }); 12 });
15 13
16 if (fullBuild || dartFilesChanged || args.isEmpty) { 14 if (fullBuild || dartFilesChanged || args.isEmpty) {
17 copyDirectory(new Uri.file('packages/'), new Uri.file('app/packages/')); 15 copyDirectory(new Uri.file('packages/'), new Uri.file('app/packages/'));
18 } 16 }
19 } 17 }
20 18
(...skipping 15 matching lines...) Expand all
36 File srcFile = new File(src.toFilePath()); 34 File srcFile = new File(src.toFilePath());
37 File destFile = new File(dest.resolve(src.pathSegments.last).toFilePath()); 35 File destFile = new File(dest.resolve(src.pathSegments.last).toFilePath());
38 36
39 if (!destFile.existsSync() || 37 if (!destFile.existsSync() ||
40 srcFile.lastModifiedSync() != destFile.lastModifiedSync()) { 38 srcFile.lastModifiedSync() != destFile.lastModifiedSync()) {
41 new Directory(dest.toFilePath()).createSync(recursive: true); 39 new Directory(dest.toFilePath()).createSync(recursive: true);
42 40
43 destFile.writeAsBytesSync(srcFile.readAsBytesSync()); 41 destFile.writeAsBytesSync(srcFile.readAsBytesSync());
44 } 42 }
45 } 43 }
OLDNEW
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.core_test/src-dart/pub_package_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698