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

Side by Side Diff: pkg/polymer/bin/new_entry.dart

Issue 584523004: Remove platform.js from the entry point boilerplate, as it's not (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /// 1 ///
2 /// Script to create boilerplate for a Polymer element. 2 /// Script to create boilerplate for a Polymer element.
3 /// Produces new .html entry point for a polymer app and updates the 3 /// Produces new .html entry point for a polymer app and updates the
4 /// pubspec.yaml to reflect it. 4 /// pubspec.yaml to reflect it.
5 /// 5 ///
6 /// Run this script with pub run: 6 /// Run this script with pub run:
7 /// 7 ///
8 /// pub run polymer:new_entry <html_file> 8 /// pub run polymer:new_entry <html_file>
9 /// 9 ///
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Returns true if the pubspec file was modified. It might not be modified if 88 // Returns true if the pubspec file was modified. It might not be modified if
89 // there was a monolithic polymer transformer in the pubspec, or if the entry 89 // there was a monolithic polymer transformer in the pubspec, or if the entry
90 // point for some reason already existed in the pubspec. 90 // point for some reason already existed in the pubspec.
91 bool _createBoilerPlate(String entryPoint, String pubspecDir) { 91 bool _createBoilerPlate(String entryPoint, String pubspecDir) {
92 92
93 String html = ''' 93 String html = '''
94 <!doctype html> 94 <!doctype html>
95 <html> 95 <html>
96 <head> 96 <head>
97 <script src="packages/web_components/platform.js"></script>
98 <script src="packages/web_components/dart_support.js"></script> 97 <script src="packages/web_components/dart_support.js"></script>
99 98
100 <!-- link rel="import" href="path_to_html_import.html" --> 99 <!-- link rel="import" href="path_to_html_import.html" -->
101 </head> 100 </head>
102 <body> 101 <body>
103 <!-- HTML for body here --> 102 <!-- HTML for body here -->
104 <script type="application/dart">export 'package:polymer/init.dart';</script> 103 <script type="application/dart">export 'package:polymer/init.dart';</script>
105 </body> 104 </body>
106 </html> 105 </html>
107 '''; 106 ''';
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 '${textToInsert}\n${pubspecText.substring(insertionPoint)}'; 179 '${textToInsert}\n${pubspecText.substring(insertionPoint)}';
181 } 180 }
182 181
183 _writePubspec(pubspecPath, pubspecText); 182 _writePubspec(pubspecPath, pubspecText);
184 return true; 183 return true;
185 } 184 }
186 185
187 _writePubspec(String pubspecPath, String text) { 186 _writePubspec(String pubspecPath, String text) {
188 new File(pubspecPath).writeAsStringSync(text); 187 new File(pubspecPath).writeAsStringSync(text);
189 } 188 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698