From 362f8193abd6846c42be8b895f7f88373b2b8796 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 26 Mar 2015 17:17:34 -0700 Subject: [PATCH] Improve Sky READMEs TBR=ojan@chromium.org Review URL: https://codereview.chromium.org/1037163002 --- examples/README.md | 13 +++++++++++++ examples/hello_world/hello_world.dart | 11 +++++++++++ examples/hello_world/main.sky | 7 +++++++ examples/stocks/main.sky | 2 +- examples/stocks/pubspec.yaml | 2 +- examples/widgets/main.sky | 2 +- 6 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 examples/README.md create mode 100644 examples/hello_world/hello_world.dart create mode 100644 examples/hello_world/main.sky diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000000..6305be9681 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,13 @@ +Sky Examples +============ + +This directory contains several examples of using Sky. + +1. *Hello, world.* The [hello world app](hello_world) is a basic app that shows + the text "hello, world." + +2. *Stocks.* The [stocks app](stocks) is an example of a typical mobile app + built using Sky. The app shows a list of all the stocks in the NASDAQ. + +3. *Widgets.* The [widgets app](widgets) contains a number of Sky widgets so + you can experiment with them in a simple container. diff --git a/examples/hello_world/hello_world.dart b/examples/hello_world/hello_world.dart new file mode 100644 index 0000000000..0ad7536b59 --- /dev/null +++ b/examples/hello_world/hello_world.dart @@ -0,0 +1,11 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:sky/framework/fn.dart'; + +class HelloWorldApp extends App { + Node build() { + return new Text('Hello, world!'); + } +} diff --git a/examples/hello_world/main.sky b/examples/hello_world/main.sky new file mode 100644 index 0000000000..a32206943c --- /dev/null +++ b/examples/hello_world/main.sky @@ -0,0 +1,7 @@ + diff --git a/examples/stocks/main.sky b/examples/stocks/main.sky index 4ae7fec6ca..b57f262ef8 100644 --- a/examples/stocks/main.sky +++ b/examples/stocks/main.sky @@ -8,7 +8,7 @@ diff --git a/examples/stocks/pubspec.yaml b/examples/stocks/pubspec.yaml index 81725bd7d0..bb96cfddc7 100644 --- a/examples/stocks/pubspec.yaml +++ b/examples/stocks/pubspec.yaml @@ -1,7 +1,7 @@ name: stocks author: Chromium Authors description: A demo application using Sky that shows stock data -homepage: https://github.com/domokit/mojo/tree/master/sky/examples/stocks-fn +homepage: https://github.com/domokit/sky_sdk/tree/master/examples/stocks version: 0.0.1 dependencies: sky: '>=0.0.1 <1.0.0' diff --git a/examples/widgets/main.sky b/examples/widgets/main.sky index c7c304f909..506b0ff837 100644 --- a/examples/widgets/main.sky +++ b/examples/widgets/main.sky @@ -8,7 +8,7 @@