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

Side by Side Diff: lib/src/utils.dart

Issue 111893006: Switch web_ui to use path 1.0.0 (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « lib/src/compiler.dart ('k') | lib/web_ui.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 // 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 library web_ui.src.utils; 5 library web_ui.src.utils;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:path/path.dart' show Builder; 9 import 'package:path/path.dart' show Context;
10 10
11 11
12 /** 12 /**
13 * An instance of the path library builder. We could just use the default 13 * An instance of the path library builder. We could just use the default
14 * builder in path, but we add this indirection to make it possible to run 14 * builder in path, but we add this indirection to make it possible to run
15 * unittest for windows paths. 15 * unittest for windows paths.
16 */ 16 */
17 Builder path = new Builder(); 17 Context path = new Context();
18 18
19 /** Convert a OS specific path into a url. */ 19 /** Convert a OS specific path into a url. */
20 String pathToUrl(String relPath) => 20 String pathToUrl(String relPath) =>
21 (path.separator == '/') ? relPath : path.split(relPath).join('/'); 21 (path.separator == '/') ? relPath : path.split(relPath).join('/');
22 22
23 /** 23 /**
24 * Converts a string name with hyphens into an identifier, by removing hyphens 24 * Converts a string name with hyphens into an identifier, by removing hyphens
25 * and capitalizing the following letter. Optionally [startUppercase] to 25 * and capitalizing the following letter. Optionally [startUppercase] to
26 * captialize the first letter. 26 * captialize the first letter.
27 */ 27 */
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 if (message != null) { 297 if (message != null) {
298 additionalMessage = '\nInternal message: $message'; 298 additionalMessage = '\nInternal message: $message';
299 } 299 }
300 return "We're sorry, you've just found a compiler bug. " 300 return "We're sorry, you've just found a compiler bug. "
301 'You can report it at:\n' 301 'You can report it at:\n'
302 'https://github.com/dart-lang/web-ui/issues/new\n' 302 'https://github.com/dart-lang/web-ui/issues/new\n'
303 'Thanks in advance for the bug report! It will help us improve Web UI.' 303 'Thanks in advance for the bug report! It will help us improve Web UI.'
304 '$additionalMessage'; 304 '$additionalMessage';
305 } 305 }
306 } 306 }
OLDNEW
« no previous file with comments | « lib/src/compiler.dart ('k') | lib/web_ui.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698