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

Side by Side Diff: lib/component_build.dart

Issue 55143003: webui fixes for 0.8.9 (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Common logic to make it easy to create a `build.dart` for your project. 6 * Common logic to make it easy to create a `build.dart` for your project.
7 * 7 *
8 * The `build.dart` script is invoked automatically by the Editor whenever a 8 * The `build.dart` script is invoked automatically by the Editor whenever a
9 * file in the project changes. It must be placed in the root of a project 9 * file in the project changes. It must be placed in the root of a project
10 * (where pubspec.yaml lives) and should be named exactly 'build.dart'. 10 * (where pubspec.yaml lives) and should be named exactly 'build.dart'.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 tasks.add(lastTask); 104 tasks.add(lastTask);
105 } 105 }
106 } 106 }
107 return tasks.future.then((r) => r.where((v) => v != null)); 107 return tasks.future.then((r) => r.where((v) => v != null));
108 }, printTime: printTime, useColors: useColors); 108 }, printTime: printTime, useColors: useColors);
109 } 109 }
110 110
111 String _outDir(String file) => path.join(path.dirname(file), 'out'); 111 String _outDir(String file) => path.join(path.dirname(file), 'out');
112 112
113 /** Tell whether [filePath] is a generated file. */ 113 /** Tell whether [filePath] is a generated file. */
114 bool _isGeneratedFile(String filePath, List<Directory> outputOnlyDirs) { 114 bool _isGeneratedFile(String filePath, List<String> outputOnlyDirs) {
115 var dirPrefix = path.dirname(filePath); 115 var dirPrefix = path.dirname(filePath);
116 for (var outDir in outputOnlyDirs) { 116 for (var outDir in outputOnlyDirs) {
117 if (dirPrefix.startsWith(outDir)) return true; 117 if (dirPrefix.startsWith(outDir)) return true;
118 } 118 }
119 return path.basename(filePath).startsWith('_'); 119 return path.basename(filePath).startsWith('_');
120 } 120 }
121 121
122 /** Tell whether [filePath] is an input file. */ 122 /** Tell whether [filePath] is an input file. */
123 bool _isInputFile(String filePath, List<String> outputOnlyDirs) { 123 bool _isInputFile(String filePath, List<String> outputOnlyDirs) {
124 var ext = path.extension(filePath); 124 var ext = path.extension(filePath);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (args["help"]) { 157 if (args["help"]) {
158 print('A build script that invokes the web-ui compiler (dwc).'); 158 print('A build script that invokes the web-ui compiler (dwc).');
159 print('Usage: dart build.dart [options] [-- [dwc-options]]'); 159 print('Usage: dart build.dart [options] [-- [dwc-options]]');
160 print('\nThese are valid options expected by build.dart:'); 160 print('\nThese are valid options expected by build.dart:');
161 print(parser.getUsage()); 161 print(parser.getUsage());
162 print('\nThese are valid options expected by dwc:'); 162 print('\nThese are valid options expected by dwc:');
163 dwc.run(['-h']).then((_) => exit(0)); 163 dwc.run(['-h']).then((_) => exit(0));
164 } 164 }
165 return args; 165 return args;
166 } 166 }
OLDNEW
« no previous file with comments | « example/wiki_css/build.dart ('k') | lib/dwc.dart » ('j') | pubspec.yaml » ('J')

Powered by Google App Engine
This is Rietveld 408576698