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

Side by Side Diff: pkg/polymer/lib/src/build/common.dart

Issue 27274002: Fixing bots after Polymer element integration (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months 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 | pkg/polymer/test/build/all_phases_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** Common methods used by transfomers. */ 5 /** Common methods used by transfomers. */
6 library polymer.src.build.common; 6 library polymer.src.build.common;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
(...skipping 10 matching lines...) Expand all
21 {bool checkDocType: true}) { 21 {bool checkDocType: true}) {
22 // TODO(jmesserly): make HTTP encoding configurable 22 // TODO(jmesserly): make HTTP encoding configurable
23 var parser = new HtmlParser(contents, encoding: 'utf8', generateSpans: true, 23 var parser = new HtmlParser(contents, encoding: 'utf8', generateSpans: true,
24 sourceUrl: sourcePath); 24 sourceUrl: sourcePath);
25 var document = parser.parse(); 25 var document = parser.parse();
26 26
27 // Note: errors aren't fatal in HTML (unless strict mode is on). 27 // Note: errors aren't fatal in HTML (unless strict mode is on).
28 // So just print them as warnings. 28 // So just print them as warnings.
29 for (var e in parser.errors) { 29 for (var e in parser.errors) {
30 if (checkDocType || e.errorCode != 'expected-doctype-but-got-start-tag') { 30 if (checkDocType || e.errorCode != 'expected-doctype-but-got-start-tag') {
31 logger.warning(e.message, e.span); 31 logger.warning(e.message, span: e.span);
32 } 32 }
33 } 33 }
34 return document; 34 return document;
35 } 35 }
36 36
37 /** Additional options used by polymer transformers */ 37 /** Additional options used by polymer transformers */
38 class TransformOptions { 38 class TransformOptions {
39 String currentPackage; 39 String currentPackage;
40 List<String> entryPoints; 40 List<String> entryPoints;
41 41
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return builder.relative(builder.join('/', id.path), 153 return builder.relative(builder.join('/', id.path),
154 from: builder.join('/', builder.dirname(sourceId.path))); 154 from: builder.join('/', builder.dirname(sourceId.path)));
155 } 155 }
156 156
157 157
158 /** Convert system paths to asset paths (asset paths are posix style). */ 158 /** Convert system paths to asset paths (asset paths are posix style). */
159 String _systemToAssetPath(String assetPath) { 159 String _systemToAssetPath(String assetPath) {
160 if (path.Style.platform != path.Style.windows) return assetPath; 160 if (path.Style.platform != path.Style.windows) return assetPath;
161 return path.posix.joinAll(path.split(assetPath)); 161 return path.posix.joinAll(path.split(assetPath));
162 } 162 }
OLDNEW
« no previous file with comments | « no previous file | pkg/polymer/test/build/all_phases_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698