diff --git a/pkg/js/README.md b/pkg/js/README.md index af4b9314e7f..e28092384b4 100644 --- a/pkg/js/README.md +++ b/pkg/js/README.md @@ -20,6 +20,8 @@ If you are passing a Dart function to a JavaScript API, you must wrap it using ### Examples +There is a [full example](https://github.com/dart-lang/sdk/tree/master/pkg/js/example) hosted with the `package:js` source code. + #### Calling methods ```dart diff --git a/pkg/js/example/README.md b/pkg/js/example/README.md new file mode 100644 index 00000000000..b5dd6fd0a78 --- /dev/null +++ b/pkg/js/example/README.md @@ -0,0 +1,14 @@ +An example of using [Chart.js](aoeU). + +This example is ported from [this sample](https://github.com/nnnick/Chart.js/blob/b8691c9581bff0eeecb34f98e678dc045a18f33e/samples/line.html) in the `Chart.js` repository. + +To view the example, run `pub serve example` from the root directory of this project – the directory containing `pubspec.yaml`. + +```console +> pub serve example +Loading source assets... +Serving js example on http://localhost:8080 +Build completed successfully +``` + +You can view it with Dartium or any other browser. diff --git a/pkg/js/pubspec.yaml b/pkg/js/pubspec.yaml index fafa916f170..e0db90303c4 100644 --- a/pkg/js/pubspec.yaml +++ b/pkg/js/pubspec.yaml @@ -1,5 +1,5 @@ name: js -version: 0.6.0-beta.3 +version: 0.6.0-beta.4 authors: - Dart Team description: Access JavaScript from Dart.