Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c5719c6

Browse files
committed
Merge pull request #128 from abarth/more_readme_improvements
Improve the READMEs further
2 parents 553969c + 7ea8f87 commit c5719c6

File tree

3 files changed

+25
-28
lines changed

3 files changed

+25
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Sky is optimized for today's, and tomorrow's, mobile devices. We are focused
88
on low-latency input, high frame rates, and we are purely mobile first.
99

1010
- For information about using Sky to build apps, please see
11-
[Getting Started with Sky](sky/sdk/README.md).
11+
[Getting started with Sky](sky/sdk/README.md).
1212

1313
- For information about contributing to Sky, please see
1414
[CONTRIBUTING.md](CONTRIBUTING.md).

sky/sdk/README.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
Getting Started with Sky
1+
Getting started with Sky
22
========================
33

44
Sky apps are written in Dart. To get started, we need to set up Dart SDK:
55

66
- Install the [Dart SDK](https://www.dartlang.org/downloads/).
7-
- Ensure that `$DART_SDK` is set to the path of your Dart SDK.
7+
- Ensure that `$DART_SDK` is set to the path of your Dart SDK and that the
8+
`dart` and `pub` executables are on your `$PATH`.
89

910
Once we have the Dart SDK, we can creating a new directory and
1011
adding a [pubspec.yaml](https://www.dartlang.org/tools/pub/pubspec.html):
@@ -15,24 +16,22 @@ dependencies:
1516
sky: any
1617
```
1718
18-
Once the pubspec is in place, create a `lib` directory (where your dart code
19-
will go) ensure that the 'dart' and 'pub' executables are on your $PATH and
20-
run the following:
19+
Once the `pubspec.yaml` is in place, create a `lib` directory (where your Dart\
20+
code will go) and use the `pub` tool to fetch the Sky package and its
21+
dependencies:
2122

2223
- `mkdir lib`
2324
- `pub get && pub run sky:init`
2425

25-
Currently the Sky Engine assumes the entry point for your application is a
26-
`main` function in `lib/main.dart`:
26+
Currently Sky assumes the entry point for your application is a `main` function
27+
in `lib/main.dart`:
2728

2829
```dart
2930
import 'package:sky/widgets/basic.dart';
3031
3132
class HelloWorldApp extends App {
3233
Widget build() {
33-
return new Center(
34-
child: new Text('Hello, world!')
35-
);
34+
return new Center(child: new Text('Hello, world!'));
3635
}
3736
}
3837
@@ -41,11 +40,9 @@ void main() {
4140
}
4241
```
4342

44-
Execution starts in `main`, which instructs the framework to run a new
45-
instance of the `HelloWorldApp`. The framework then calls the `build()`
46-
function on `HelloWorldApp` to create a tree of widgets, some of which might
47-
be other `Components`, which in turn have `build()` functions that generate
48-
more widgets iteratively to create the widget hierarchy. To learn more about
43+
Execution starts in `main`, which runs a new instance of the `HelloWorldApp`.
44+
The `HelloWorldApp` builds a `Text` widget containing the famous _Hello, world!_
45+
string and centers it on the screen using a `Center` widget. To learn more about
4946
the widget system, please see the [widgets tutorial](lib/widgets/README.md).
5047

5148
Setup your Android device
@@ -84,19 +81,19 @@ follow these instructions:
8481
`adb logcat -s sky` can be used to filter only adb messages from
8582
`SkyDemo.apk`.
8683

87-
Building a standalone APK
88-
-------------------------
89-
90-
Although it is possible to build a standalone APK containing your application,
91-
doing so right now is difficult. If you're feeling brave, you can see how we
92-
build the `Stocks.apk` in [example/stocks](example/stocks). Eventually we plan
93-
to make this much easier and support platforms other than Android, but that work
94-
still in progress.
95-
9684
Debugging
9785
---------
9886

9987
Sky uses [Observatory](https://www.dartlang.org/tools/observatory/) for
10088
debugging and profiling. While running your Sky app using `sky_tool`, you can
10189
access Observatory by navigating your web browser to
10290
[http://localhost:8181/](http://localhost:8181/).
91+
92+
Building a standalone APK
93+
-------------------------
94+
95+
Although it is possible to build a standalone APK containing your application,
96+
doing so right now is difficult. If you're feeling brave, you can see how we
97+
build the `Stocks.apk` in [example/stocks](example/stocks). Eventually we plan
98+
to make this much easier and support platforms other than Android, but that work
99+
still in progress.

sky/sdk/lib/widgets/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ in the underlying render tree to transition from one state to the next.
1212
Hello World
1313
-----------
1414

15-
To build an application, create a subclass of App and instantiate it:
15+
To build an application, create a subclass of `App` and instantiate it:
1616

1717
```dart
1818
import 'package:sky/widgets/basic.dart';
1919
2020
class HelloWorldApp extends App {
2121
Widget build() {
22-
return new Text('Hello, world!');
22+
return new Center(child: new Text('Hello, world!'));
2323
}
2424
}
2525
@@ -403,7 +403,7 @@ an existing stateful component) you'll avoid unnecessary work. Also, some
403403
operations that involve interacting with the widget hierarchy cannot be
404404
done in a component's constructor.
405405

406-
When overriding `initState`, a component should call its superclass's
406+
When overriding `initState`, a component should call its superclass's
407407
`initState` function.
408408

409409
Keys

0 commit comments

Comments
 (0)