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

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

Issue 723393003: update to polymer js 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: final tweaks Created 6 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 | Annotate | Revision Log
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 /// Logic to validate that developers are correctly using Polymer constructs. 5 /// Logic to validate that developers are correctly using Polymer constructs.
6 /// This is mainly used to produce warnings for feedback in the editor. 6 /// This is mainly used to produce warnings for feedback in the editor.
7 library polymer.src.build.linter; 7 library polymer.src.build.linter;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 if (_isEntryPoint && _polymerExperimentalHtmlSeen) { 306 if (_isEntryPoint && _polymerExperimentalHtmlSeen) {
307 _logger.warning(NO_DART_SCRIPT_AND_EXPERIMENTAL, span: node.sourceSpan); 307 _logger.warning(NO_DART_SCRIPT_AND_EXPERIMENTAL, span: node.sourceSpan);
308 } 308 }
309 _dartTagSeen = true; 309 _dartTagSeen = true;
310 } 310 }
311 311
312 if (src != null && src.endsWith('web_components/dart_support.js')) { 312 if (src != null && src.endsWith('web_components/dart_support.js')) {
313 _logger.warning(DART_SUPPORT_NO_LONGER_REQUIRED, span: node.sourceSpan); 313 _logger.warning(DART_SUPPORT_NO_LONGER_REQUIRED, span: node.sourceSpan);
314 } 314 }
315 315
316 if (src != null && src.contains('web_components/webcomponents.')) {
317 _logger.warning(WEB_COMPONENTS_NO_LONGER_REQUIRED, span: node.sourceSpan);
318 }
319
320 if (src != null && src.contains('web_components/platform.')) {
321 _logger.warning(PLATFORM_JS_RENAMED, span: node.sourceSpan);
322 }
323
316 var isEmpty = node.innerHtml.trim() == ''; 324 var isEmpty = node.innerHtml.trim() == '';
317 325
318 if (src == null) { 326 if (src == null) {
319 if (isDart && isEmpty) { 327 if (isDart && isEmpty) {
320 _logger.warning(SCRIPT_TAG_SEEMS_EMPTY, span: node.sourceSpan); 328 _logger.warning(SCRIPT_TAG_SEEMS_EMPTY, span: node.sourceSpan);
321 } 329 }
322 return; 330 return;
323 } 331 }
324 332
325 if (src.endsWith('.dart') && !isDart) { 333 if (src.endsWith('.dart') && !isDart) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 upDirCount = segments.length - 2; 460 upDirCount = segments.length - 2;
453 } 461 }
454 var reachOutPrefix = '../' * upDirCount; 462 var reachOutPrefix = '../' * upDirCount;
455 return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix}); 463 return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix});
456 } 464 }
457 465
458 const List<String> INTERNALLY_DEFINED_ELEMENTS = 466 const List<String> INTERNALLY_DEFINED_ELEMENTS =
459 const ['auto-binding-dart', 'polymer-element']; 467 const ['auto-binding-dart', 'polymer-element'];
460 const List<String> AUTO_BINDING_ELEMENTS = 468 const List<String> AUTO_BINDING_ELEMENTS =
461 const ['auto-binding-dart', 'auto-binding']; 469 const ['auto-binding-dart', 'auto-binding'];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698