OLD | NEW |
1 Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 for details. All rights reserved. Use of this source code is governed by a | 2 for details. All rights reserved. Use of this source code is governed by a |
3 BSD-style license that can be found in the LICENSE file. | 3 BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 Sunflower Spectacular | 5 Sunflower Spectacular |
6 | 6 |
7 Building and running: | 7 Building and running: |
8 | 8 |
9 1. go to the top-level directory of the project: | 9 1. go to the top-level directory of the project: |
10 $ cd dart/ | 10 $ cd dart/ |
11 | 11 |
12 2. build the dartc compiler: | 12 2. build the dartc compiler: |
13 $ ./tools/build.py --arch=ia32 | 13 $ ./tools/build.py --arch=ia32 |
14 | 14 |
15 3. run the htmlconverter tool, that converts the dart code to javascript: | 15 3. either compile the Dart code to JavaScript, or load the code directly into |
16 $ python ./client/tools/htmlconverter.py \ | 16 Dartium: |
17 client/samples/sunflower/sunflower.html -o out/ | |
18 | 17 |
19 4. open the generated file in a browser: | 18 - to compile the code: |
20 $ google-chrome out/client/samples/sunflower/sunflower-js.html | 19 $(DART_SDK)/bin/frogc --out=Sunflower.dart.js Sunflower.dart |
| 20 |
| 21 4. open the generated file in a browser (either Dartium, Chrome, or another |
| 22 supported browser): |
| 23 $ google-chrome sunflower.html |
OLD | NEW |