diff --git a/examples/README.md b/examples/README.md index 6305be96816374e3643c2a20c50fb975442f970b..deb0f3cf10366558fea84729186ddd541414717b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,7 +1,10 @@ Sky Examples ============ -This directory contains several examples of using Sky. +This directory contains several examples of using Sky. Each of these is an +individual Dart application package. If you wish to run them with `sky_tool` +then you will want to run `pub get` inside their directory before running +`./packages/sky/sky_tool start`. 1. *Hello, world.* The [hello world app](hello_world) is a basic app that shows the text "hello, world." diff --git a/examples/color/pubspec.yaml b/examples/color/pubspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c3320617b1338ad61b4078fd66d207403b916989 --- /dev/null +++ b/examples/color/pubspec.yaml @@ -0,0 +1,3 @@ +name: color +dependencies: + sky: any diff --git a/examples/hello_world/pubspec.yaml b/examples/hello_world/pubspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fb27d11e6b76a59ed510ec7da09967e2807e357f --- /dev/null +++ b/examples/hello_world/pubspec.yaml @@ -0,0 +1,3 @@ +name: hello_world +dependencies: + sky: any diff --git a/examples/raw/pubspec.yaml b/examples/raw/pubspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..65813d545f08677215809c2f836d8cd4b57b5f1e --- /dev/null +++ b/examples/raw/pubspec.yaml @@ -0,0 +1,3 @@ +name: raw +dependencies: + sky: any diff --git a/examples/widgets/pubspec.yaml b/examples/widgets/pubspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1f45fe870a60af58ed8e39ccf141acfb1ffc0a94 --- /dev/null +++ b/examples/widgets/pubspec.yaml @@ -0,0 +1,3 @@ +name: widgets +dependencies: + sky: any diff --git a/sdk/README.md b/sdk/README.md index e27175d141239bc18d14d10a4c4725bcec8492b3..7ff1c5859a4fdac5b41bfd5fbbbb764b89ea382f 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -131,13 +131,23 @@ Running a Sky application ------------------------- The `sky` pub package includes a `sky_tool` script to assist in running -Sky applications inside the `SkyDemo.apk` harness. +Sky applications inside the `SkyDemo.apk` harness. The sky_tool script expects +to be run from the root directory of your application pub package. To run +one of the examples in this SDK, try: -1. ``packages/sky/sky_tool start --install examples/stocks/main.sky`` +1. ``cd examples/stocks`` + +2. ``pub get`` to set up a copy of the sky package in the app directory. + +3. ``./packages/sky/sky_tool start --install`` The --install flag is only necessary to install SkyDemo.apk if not already - installed from the Google Play store. + installed on the device. -2. Use ``adb logcat`` to view any errors or Dart print() output from the app. +4. Use ``adb logcat`` to view any errors or Dart print() output from the app. + ``adb logcat -s chromium`` can be used to filter only adb messages from + `SkyDemo.apk` (which for + [legacy reasons](https://github.com/domokit/mojo/issues/129) still uses the + android log tag 'chromium'). Measuring Performance ---------------------