var vscode = require('vscode');
function activate(context) {
}
function deactivate() {
}
exports.activate = activate;
exports.deactivate = deactivate;
@JS("extension")
library extension;
import "dart:js";
import "package:js/js.dart";
main() {
context['exports'].activate = activate;
context['exports'].deactivate = deactivate;
}
activate(dynamic context) {
print('Congratulations, your extension "dartvs-code" is now active!');
//var disposable = vscode.commands.registerCommand('extension.sayHello', function () {
// vscode.window.showInformationMessage('Hello World!');
//});
//context.subscriptions.push(disposable);
}
deactivate() {
}
@JS()
library extension;
import "dart:js";
import "package:js/js.dart";
dynamic vscode;
@JS()
external require(String module);
main() {
vscode = require('vscode');
print(context);
context['exports'].activate = activate;
context['exports'].deactivate = deactivate;
}
activate(dynamic context) {
print('Congratulations, your extension "dartvs-code" is now active!');
var disposable = vscode.commands.registerCommand('extension.sayHello', () {
vscode.window.showInformationMessage('Hello World!');
});
context.subscriptions.push(disposable);
}
deactivate() {
}
@JS()
external dynamic exports;
PS M:\Coding\TestStuff\dartvs-code\dartvs> dartanalyzer . --strong
Analyzing [.]...
Unhandled exception:
AnalysisException: Cannot compute DART_ERRORS for M:\Coding\TestStuff\dartvs-code\dartvs\lib\extension.dart
Caused by Unexpected exception while performing VerifyUnitTask for source M:\Coding\TestStuff\dartvs-code\dartvs\lib\extension.dart
#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:350)
#1 AnalysisTask.perform (package:analyzer/task/model.dart:238)
#2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:284)
#3 AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:109)
#4 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:703)
#5 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:651)
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
Giving it a go, though I really have no idea how complete/stable the dev compiler is, so I don't know if going down this route is a good path (I'm going to be relying on calling plain JS objects heavily! ...)
Giving it a go, though I really have no idea how complete/stable the dev compiler is, so I don't know if going down this route is a good path (I'm going to be relying on calling plain JS objects heavily! ...)
It might be a bit of a rocky road today, but I personally think it's a great path to explore and it would be great to get some feedback on it. Running Dart apps on node using dev_compiler and JS interop is a subject close to my heart (but, alas, not close to my schedule...).
--
Do you know of anyone else is trying to do this (that maybe I can "borrow" ideas from if I hit issues)?