0.2.7 • Published 1 year ago

dart-services v0.2.7

Weekly downloads
19
License
MIT
Repository
github
Last release
1 year ago

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

1 year ago

0.2.6

1 year ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago