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

Unified Diff: dart/third_party/pkg/js/tools/create_bootstrap.dart

Issue 57393002: Version 0.8.10.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
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 side-by-side diff with in-line comments
Download patch
Index: dart/third_party/pkg/js/tools/create_bootstrap.dart
===================================================================
--- dart/third_party/pkg/js/tools/create_bootstrap.dart (revision 29787)
+++ dart/third_party/pkg/js/tools/create_bootstrap.dart (working copy)
@@ -1,55 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * This utility carves out the embedded bootstrap JavaScript in
- * js.dart as a separate file that may be included directly in html.
- * This is necessary in settings where script injection is disallowed.
- *
- * To run, navigate to the top-level directory for this project and run:
- * .../dart ./tools/create_bootstrap.dart
- */
-library create_bootstrap;
-
-import 'dart:io';
-
-final JS_PATTERN = new RegExp(r'final _JS_BOOTSTRAP = r"""((.*\n)*)""";');
-
-final HEADER = """
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT.
-
-// TODO(vsm): Move this file once we determine where assets should go. See
-// http://dartbug.com/6101.
-""";
-
-createFile(Path source, Path target) {
- final f = new File.fromPath(source);
- f.readAsString()
- .then((text) {
- final js = JS_PATTERN.firstMatch(text).group(1);
- final out = new File.fromPath(target);
- out.create()
- .then((out) => out.open(mode: FileMode.WRITE)
- .then((file) => file.writeString(HEADER)
- .then((file) => file.writeString(js)
- .then((file) => file.close()))));
- });
-}
-
-create(Path libPath) {
- final source = libPath.append('js.dart');
- final target = libPath.append('dart_interop.js');
- createFile(source, target);
-}
-
-main() {
- final scriptPath = new Path(Platform.script).directoryPath;
- final libPath = scriptPath.join(new Path('../lib'));
- create(libPath);
-}
« no previous file with comments | « dart/third_party/pkg/js/test/js_wrapping/browser_tests.html ('k') | dart/third_party/pkg/js/update-ghpages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698