pkg/js: add link to example

Review URL: https://codereview.chromium.org/1406093002 .
This commit is contained in:
Kevin Moore 2015-10-15 16:33:05 -07:00
parent 647ada25ed
commit e32d7d7029
3 changed files with 17 additions and 1 deletions

View file

@ -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

14
pkg/js/example/README.md Normal file
View file

@ -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.

View file

@ -1,5 +1,5 @@
name: js
version: 0.6.0-beta.3
version: 0.6.0-beta.4
authors:
- Dart Team <misc@dartlang.org>
description: Access JavaScript from Dart.