考慮以下鏢Web應用程序:如何使用dart軟件包部署dart web應用程序?
import "dart:html";
// assume this is a custom library hosted somewhere on github, i.e.
// there is a pubspec.yaml entry
//
// dependencies:
// my_hello:
// git: http://github.com/foo/my_hello.git
//
import "package:my_hello/my_hello.dart" as hello;
main() {
query("#message").innerHtml = hello.message;
}
如何某處部署在Web服務器上(例如,作爲github上頁),使得它可以被用作Dartium基於鏢web應用程序?
- 我必須在Web服務器上創建一個目錄
packages
嗎? 我必須將包
my_hello.dart
複製到網絡服務器嗎?packages/my_hello/...
還是Dartium能夠解決給定
pubspec.yaml
的依賴?
http://stackoverflow.com/questions/24672090展示瞭如何配置和使用dart2dart。 – 2014-07-24 11:35:25