Skip to content

Commit 58a0166

Browse files
author
gram@google.com
committed
Update utils to new library syntax.
This doesn't include adding partofs; that will have to be done later. Review URL: https://codereview.chromium.org//11358145 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14693 260f80e4-7a28-3924-810f-c04153c831b5
1 parent d5f9483 commit 58a0166

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+166
-166
lines changed

utils/apidoc/mdn/extract.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#import ("dart:html");
2-
#import ("dart:json");
1+
import 'dart:html';
2+
import 'dart:json';
33

44
// Workaround for HTML lib missing feature.
55
Range newRange() {

utils/apidoc/mdn/postProcess.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* and obsolete.json (with entries marked obsolete).
55
*/
66

7-
#library("postProcess");
7+
library postProcess;
88

9-
#import("dart:io");
10-
#import("dart:json");
11-
#import("util.dart");
9+
import 'dart:io';
10+
import 'dart:json';
11+
import 'util.dart';
1212

1313
void main() {
1414
// Database of code documentation.

utils/apidoc/mdn/prettyPrint.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* Creates database.html, examples.html, and obsolete.html.
33
*/
44

5-
#library("prettyPrint");
5+
library prettyPrint;
66

7-
#import("dart:io");
8-
#import("dart:json");
9-
#import("util.dart");
7+
import 'dart:io';
8+
import 'dart:json';
9+
import 'util.dart';
1010

1111
String orEmpty(String str) {
1212
return str == null ? "" : str;

utils/apidoc/mdn/util.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#library("util");
1+
library util;
22

3-
#import("dart:io");
4-
#import("dart:json");
3+
import 'dart:io';
4+
import 'dart:json';
55

66
Map<String, Map> _allProps;
77

utils/apidoc/scripts/list_files.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* used when building API documentation. Used by gyp to determine when apidocs
88
* need to be regenerated (see `apidoc.gyp`).
99
*/
10-
#library('list_files');
10+
library list_files;
1111

12-
#import('dart:io');
12+
import 'dart:io';
1313

1414
const allowedExtensions = const [
1515
'.css', '.dart', '.ico', '.js', '.json', '.png', '.sh', '.txt'

utils/archive/archive.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
* The primary library file for the archive library. This is the only file that
77
* should be imported by clients.
88
*/
9-
#library("archive");
9+
library archive;
1010

11-
#import("entry.dart", prefix: "entry");
12-
#import("reader.dart", prefix: "reader");
11+
import 'entry.dart' as entry;
12+
import 'reader.dart' as reader;
1313

1414
// TODO(nweiz): Remove this when 3071 is fixed.
1515
/** An error raised by the archive library. */

utils/archive/entry.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
#library("entry");
5+
library entry;
66

7-
#import("dart:io");
8-
#import("archive.dart", prefix: "archive");
9-
#import("entry_request.dart");
10-
#import("read_request.dart", prefix: 'read');
11-
#import("utils.dart");
7+
import 'dart:io';
8+
import 'archive.dart' as archive;
9+
import 'entry_request.dart';
10+
import 'read_request.dart' as read;
11+
import 'utils.dart';
1212

1313
/**
1414
* A single file in an archive.

utils/archive/entry_request.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
/** The request ids for entry-related messages to send to the C extension. */
6-
#library("entry_request");
6+
library entry_request;
77

8-
#import("read_request.dart", prefix: "read");
8+
import 'read_request.dart' as read;
99

1010
final int _first = read.LAST;
1111

utils/archive/input_stream.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
#library("input_stream");
5+
library input_stream;
66

7-
#import("archive.dart", prefix: "archive");
8-
#import("entry.dart");
9-
#import("read_request.dart");
10-
#import("utils.dart");
7+
import 'archive.dart' as archive;
8+
import 'entry.dart';
9+
import 'read_request.dart';
10+
import 'utils.dart';
1111

1212
/**
1313
* A stream of [ArchiveEntry]s being read from an archive.

utils/archive/options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
#library('options');
5+
library options;
66

77
/**
88
* An individual option.

0 commit comments

Comments
 (0)