Improve Sky READMEs
TBR=ojan@chromium.org Review URL: https://codereview.chromium.org/1037163002
This commit is contained in:
13
examples/README.md
Normal file
13
examples/README.md
Normal file
@@ -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.
|
||||
11
examples/hello_world/hello_world.dart
Normal file
11
examples/hello_world/hello_world.dart
Normal file
@@ -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!');
|
||||
}
|
||||
}
|
||||
7
examples/hello_world/main.sky
Normal file
7
examples/hello_world/main.sky
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import 'hello_world.dart';
|
||||
|
||||
void main() {
|
||||
new HelloWorldApp();
|
||||
}
|
||||
</script>
|
||||
@@ -8,7 +8,7 @@
|
||||
<script>
|
||||
// TODO(abarth): Should this be package:stocks/stocks_app.dart?
|
||||
import 'lib/stock_app.dart';
|
||||
main() {
|
||||
void main() {
|
||||
new StocksApp();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: stocks
|
||||
author: Chromium Authors <sky-dev@googlegroups.com>
|
||||
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'
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<import src="/sky/framework/debug/shake-to-reload.sky" />
|
||||
<script>
|
||||
import 'widgets_app.dart';
|
||||
main() {
|
||||
void main() {
|
||||
new WidgetsApp();
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user