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 /// Source maps library. |
6 /// | 6 /// |
7 /// ## Installing ## | |
8 /// | |
9 /// Use [pub][] to install this package. Add the following to your `pubspec.yaml ` | |
Andrei Mouravski
2013/04/19 20:13:35
Line too long.
sethladd
2013/04/19 20:32:43
Done.
| |
10 /// file. | |
11 /// | |
12 /// dependencies: | |
13 /// source_maps: any | |
14 /// | |
15 /// And then run `pub install`. | |
16 /// | |
17 /// ## Using ## | |
18 /// | |
7 /// Create a source map using [SourceMapBuilder]. For example: | 19 /// Create a source map using [SourceMapBuilder]. For example: |
8 /// var json = (new SourceMapBuilder() | 20 /// var json = (new SourceMapBuilder() |
9 /// ..add(inputSpan1, outputSpan1) | 21 /// ..add(inputSpan1, outputSpan1) |
10 /// ..add(inputSpan2, outputSpan2) | 22 /// ..add(inputSpan2, outputSpan2) |
11 /// ..add(inputSpan3, outputSpan3) | 23 /// ..add(inputSpan3, outputSpan3) |
12 /// .toJson(outputFile); | 24 /// .toJson(outputFile); |
13 /// | 25 /// |
14 /// Use the [Span] and [SourceFile] classes to specify span locations. | 26 /// Use the [Span] and [SourceFile] classes to specify span locations. |
15 /// | 27 /// |
16 /// Parse a source map using [parse], and call `spanFor` on the returned mapping | 28 /// Parse a source map using [parse], and call `spanFor` on the returned mapping |
17 /// object. For example: | 29 /// object. For example: |
18 /// var mapping = parse(json); | 30 /// var mapping = parse(json); |
19 /// mapping.spanFor(outputSpan1.line, outputSpan1.column) | 31 /// mapping.spanFor(outputSpan1.line, outputSpan1.column) |
32 /// | |
33 /// [pub]: http://pub.dartlang.org | |
20 library source_maps; | 34 library source_maps; |
21 | 35 |
22 export "builder.dart"; | 36 export "builder.dart"; |
23 export "parser.dart"; | 37 export "parser.dart"; |
24 export "printer.dart"; | 38 export "printer.dart"; |
25 export "span.dart"; | 39 export "span.dart"; |
OLD | NEW |