Skip to content

Commit 794f6d7

Browse files
authored
Drop node bits (#1393)
No longer used/supported
1 parent 85cf542 commit 794f6d7

File tree

3 files changed

+0
-102
lines changed

3 files changed

+0
-102
lines changed

pubspec.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ dependencies:
1919
dev_dependencies:
2020
dart_flutter_team_lints: ^2.0.0
2121
grinder: ^0.9.0-nullsafety.0
22-
js: ^0.6.0
23-
# TODO(rnystrom): Disabled for now because node_preamble is not migrated yet
24-
# and publishing to npm hasn't been used in a while.
25-
# node_preamble: ^1.0.0
2622
test: ^1.24.6
2723
test_descriptor: ^2.0.0
2824
test_process: ^2.0.0

tool/grind.dart

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,6 @@ Future<void> validate() async {
2626
Dart.run('bin/format.dart', arguments: ['-w', '.']);
2727
}
2828

29-
// TODO(rnystrom): Disabled for now because node_preamble is not migrated and
30-
// this isn't used anyway.
31-
/*
32-
@Task('Publish to npm')
33-
void npm() {
34-
var out = 'dist';
35-
36-
var pubspec = yaml.loadYaml(getFile('pubspec.yaml').readAsStringSync());
37-
var homepage = pubspec['homepage'];
38-
var fileName = 'index.js';
39-
40-
// Generate modified dart2js output suitable to run on node.
41-
var tempFile = File('${Directory.systemTemp.path}/temp.js');
42-
43-
Dart2js.compile(File('tool/node_format_service.dart'),
44-
outFile: tempFile, categories: 'all');
45-
var dart2jsOutput = tempFile.readAsStringSync();
46-
File('$out/$fileName').writeAsStringSync('''${preamble.getPreamble()}
47-
self.exports = exports; // Temporary hack for Dart-JS Interop under node.
48-
$dart2jsOutput''');
49-
50-
File('$out/package.json')
51-
.writeAsStringSync(const JsonEncoder.withIndent(' ').convert({
52-
'name': 'dart-style',
53-
'version': pubspec['version'],
54-
'description': pubspec['description'],
55-
'main': fileName,
56-
'typings': 'dart-style.d.ts',
57-
'scripts': {'test': 'echo "Error: no test specified" && exit 1'},
58-
'repository': {'type': 'git', 'url': 'git+$homepage'},
59-
'author': pubspec['author'],
60-
'license': 'BSD',
61-
'bugs': {'url': '$homepage/issues'},
62-
'homepage': homepage
63-
}));
64-
run('npm', arguments: ['publish', out]);
65-
}
66-
*/
67-
6829
/// Gets ready to publish a new version of the package.
6930
///
7031
/// To publish a version, you need to:

tool/node_format_service.dart

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)