OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 /** | 6 /** |
7 * This utility carves out the embedded bootstrap JavaScript in | 7 * This utility carves out the embedded bootstrap JavaScript in |
8 * js.dart as a separate file that may be included directly in html. | 8 * js.dart as a separate file that may be included directly in html. |
9 * This is necessary in settings where script injection is disallowed. | 9 * This is necessary in settings where script injection is disallowed. |
10 * | 10 * |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 }); | 42 }); |
43 } | 43 } |
44 | 44 |
45 create(Path libPath) { | 45 create(Path libPath) { |
46 final source = libPath.append('js.dart'); | 46 final source = libPath.append('js.dart'); |
47 final target = libPath.append('dart_interop.js'); | 47 final target = libPath.append('dart_interop.js'); |
48 createFile(source, target); | 48 createFile(source, target); |
49 } | 49 } |
50 | 50 |
51 main() { | 51 main() { |
52 final options = new Options(); | 52 final scriptPath = new Path(Platform.script).directoryPath; |
53 final scriptPath = new Path(options.script).directoryPath; | |
54 final libPath = scriptPath.join(new Path('../lib')); | 53 final libPath = scriptPath.join(new Path('../lib')); |
55 create(libPath); | 54 create(libPath); |
56 } | 55 } |
OLD | NEW |