提交 06adbc9a 编写于 作者: A Adam Barth

Move examples to //sky/sdk/example

We're trying to follow the pattern described in https://www.dartlang.org/tools/pub/package-layout.html

TBR=iansf@google.com

Review URL: https://codereview.chromium.org/1210173004.
上级 dcabb54a
......@@ -18,6 +18,6 @@ public class StocksActivity extends SkyActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
loadUrl("https://domokit.github.io/sky/sdk/lib/example/stocks/index.sky");
loadUrl("https://domokit.github.io/sky/sdk/example/stocks/index.sky");
}
}
......@@ -88,7 +88,7 @@ to the underlying render tree.
* To learn how to run Sky on your device, please see the
[Running a Sky application](#running-a-sky-application) section in this
document.
* To dive into examples, please see the [examples directory](lib/example).
* To dive into examples, please see the [examples directory](example/).
Services
--------
......@@ -146,7 +146,7 @@ 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. `cd sdk/lib/example/stocks`
1. `cd example/stocks`
2. `pub get` to set up a copy of the sky package in the app directory.
......
......@@ -51,17 +51,17 @@ class SkyDemo extends Component {
class SkyHome extends App {
Widget build() {
List<Widget> children = [
new SkyDemo('Stocks App', 'lib/example/stocks2/lib/stock_app.dart'),
new SkyDemo('Asteroids Game', 'lib/example/game/main.dart'),
new SkyDemo('Interactive Flex', 'lib/example/rendering/interactive_flex.dart'),
new SkyDemo('Sector Layout', 'lib/example/widgets/sector.dart'),
new SkyDemo('Touch Demo', 'lib/example/rendering/touch_demo.dart'),
new SkyDemo('Minedigger Game', 'lib/example/mine_digger/mine_digger.dart'),
new SkyDemo('Stocks App', 'example/stocks2/lib/stock_app.dart'),
new SkyDemo('Asteroids Game', 'example/game/main.dart'),
new SkyDemo('Interactive Flex', 'example/rendering/interactive_flex.dart'),
new SkyDemo('Sector Layout', 'example/widgets/sector.dart'),
new SkyDemo('Touch Demo', 'example/rendering/touch_demo.dart'),
new SkyDemo('Minedigger Game', 'example/mine_digger/mine_digger.dart'),
// TODO(eseidel): We could use to separate these groups?
new SkyDemo('Old Stocks App', 'lib/example/stocks/main.sky'),
new SkyDemo('Old Touch Demo', 'lib/example/raw/touch-demo.sky'),
new SkyDemo('Old Spinning Square', 'lib/example/raw/spinning-square.sky'),
new SkyDemo('Old Stocks App', 'example/stocks/main.sky'),
new SkyDemo('Old Touch Demo', 'example/raw/touch-demo.sky'),
new SkyDemo('Old Spinning Square', 'example/raw/spinning-square.sky'),
new SkyDemo('Licences (Old)', 'LICENSES.sky'),
];
......
......@@ -147,7 +147,7 @@ If you want to define a `RenderObject` that uses a new coordinate
system, then you should inherit straight from `RenderObject`. Examples
of doing this can be found in [`RenderBox`](box.dart), which deals in
rectangles in cartesian space, and in the [sector_layout.dart
example](../../../sdk/lib/example/rendering/sector_layout.dart), which
example](../../example/rendering/sector_layout.dart), which
implements a toy model based on polar coordinates. The `RenderView`
class, which is used internally to adapt from the host system to this
rendering framework, is another example.
......
......@@ -6,7 +6,7 @@ import 'dart:async';
import 'package:sky/widgets/widget.dart';
import '../../sdk/lib/example/widgets/sector.dart';
import '../../sdk/example/widgets/sector.dart';
import '../resources/display_list.dart';
main() async {
......
......@@ -6,7 +6,7 @@ import 'dart:async';
import 'package:sky/widgets/widget.dart';
import '../../sdk/lib/example/stocks2/lib/stock_app.dart';
import '../../sdk/example/stocks2/lib/stock_app.dart';
import '../resources/display_list.dart';
class TestStocksApp extends StocksApp {
......
......@@ -6,7 +6,7 @@ import 'dart:async';
import 'package:sky/widgets/widget.dart';
import '../../sdk/lib/example/widgets/styled_text.dart';
import '../../sdk/example/widgets/styled_text.dart';
import '../resources/display_list.dart';
main() async {
......
......@@ -6,7 +6,7 @@ import 'dart:async';
import 'package:sky/widgets/widget.dart';
import '../../sdk/lib/example/widgets/tabs.dart';
import '../../sdk/example/widgets/tabs.dart';
import '../resources/display_list.dart';
main() async {
......
......@@ -4,7 +4,7 @@
import 'dart:async';
import '../../sdk/lib/example/rendering/sector_layout.dart';
import '../../sdk/example/rendering/sector_layout.dart';
import '../resources/display_list.dart';
void main() {
......
......@@ -397,7 +397,7 @@ def run_analyzer(port, options, args, logging_stream):
sky_tools_dir = os.path.dirname(os.path.dirname(test_dir))
analyzer_path = os.path.join(sky_tools_dir, 'skyanalyzer')
src_dir = os.path.dirname(os.path.dirname(sky_tools_dir))
analyzer_target_path = os.path.join(src_dir, 'sky/sdk/lib/example/stocks2/lib/stock_app.dart')
analyzer_target_path = os.path.join(src_dir, 'sky/sdk/example/stocks2/lib/stock_app.dart')
analyzer_args = [
analyzer_path,
build_dir,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册