OLD | NEW |
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 /// Source maps library. | 5 /// Library to create and parse source maps. |
6 /// | |
7 /// ## Installing ## | |
8 /// | |
9 /// Use [pub][] to install this package. Add the following to your | |
10 /// `pubspec.yaml` file. | |
11 /// | |
12 /// dependencies: | |
13 /// source_maps: any | |
14 /// | |
15 /// Then run `pub install`. | |
16 /// | |
17 /// For more information, see the | |
18 /// [source_maps package on pub.dartlang.org][pkg]. | |
19 /// | |
20 /// ## Using ## | |
21 /// | 6 /// |
22 /// Create a source map using [SourceMapBuilder]. For example: | 7 /// Create a source map using [SourceMapBuilder]. For example: |
23 /// var json = (new SourceMapBuilder() | 8 /// var json = (new SourceMapBuilder() |
24 /// ..add(inputSpan1, outputSpan1) | 9 /// ..add(inputSpan1, outputSpan1) |
25 /// ..add(inputSpan2, outputSpan2) | 10 /// ..add(inputSpan2, outputSpan2) |
26 /// ..add(inputSpan3, outputSpan3) | 11 /// ..add(inputSpan3, outputSpan3) |
27 /// .toJson(outputFile); | 12 /// .toJson(outputFile); |
28 /// | 13 /// |
29 /// Use the [Span] and [SourceFile] classes to specify span locations. | 14 /// Use the [Span] and [SourceFile] classes to specify span locations. |
30 /// | 15 /// |
31 /// Parse a source map using [parse], and call `spanFor` on the returned mapping | 16 /// Parse a source map using [parse], and call `spanFor` on the returned mapping |
32 /// object. For example: | 17 /// object. For example: |
33 /// var mapping = parse(json); | 18 /// var mapping = parse(json); |
34 /// mapping.spanFor(outputSpan1.line, outputSpan1.column) | 19 /// mapping.spanFor(outputSpan1.line, outputSpan1.column) |
35 /// | 20 /// |
| 21 /// ## Getting the code ## |
| 22 /// |
| 23 /// This library is distributed as a [pub][] package. To install this package, |
| 24 /// add the following to your `pubspec.yaml` file: |
| 25 /// |
| 26 /// dependencies: |
| 27 /// source_maps: any |
| 28 /// |
| 29 /// After you run `pub install`, you should be able to access this library by |
| 30 /// importing `package:source_maps/source_maps.dart`. |
| 31 /// |
| 32 /// For more information, see the |
| 33 /// [source_maps package on pub.dartlang.org][pkg]. |
| 34 /// |
36 /// [pub]: http://pub.dartlang.org | 35 /// [pub]: http://pub.dartlang.org |
37 /// [pkg]: http://pub.dartlang.org/packages/source_maps | 36 /// [pkg]: http://pub.dartlang.org/packages/source_maps |
38 library source_maps; | 37 library source_maps; |
39 | 38 |
40 export "builder.dart"; | 39 export "builder.dart"; |
41 export "parser.dart"; | 40 export "parser.dart"; |
42 export "printer.dart"; | 41 export "printer.dart"; |
43 export "span.dart"; | 42 export "span.dart"; |
OLD | NEW |