0.2.7 • Published 2 years ago
dart-services v0.2.7
dart service api wrapper
This is a ts wrapper for aclling dartservies api, which remotely compiles dart code to js - executable for flutter
Install
yarn add dart-services
// default usage
import DartServices from "dart-services";
const service = DartServices.create();
// or with custom channel
const beta = DartServices.create({
channel: "beta",
});
// or with custom backend
const myserver = DartServices.create({
baseUrl: "http://localhost:8080",
});
// using dedicated channels
import { stable } from "dart-services";
import { beta } from "dart-services";
// compile apis
const maindartsrc = "...";
// compile ddc
service.compileDDC(maindartsrc);
// compile
service.compile(maindartsrc);
// compile complete
service.compileComplete(maindartsrc);
// analyze
service.analyze(maindartsrc);
// or simply use this simple function.
import { compileComplete } from "dart-services";
compileComplete(maindartsrc);
Difference between compileDDC and compileComplete
see - https://github.com/dart-lang/dart-pad/blob/master/lib/services/execution_iframe.dart
The iframe source, https://dartpad.dev/scripts/frame_dark.html requires compiled js with compiledDDC and it needs to be transformed statically following the execution_iframe.dart
's logic.
References
0.2.7
2 years ago
0.2.6
2 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.3
4 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago