Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: src/site/docs/standalone-dart-vm/index.markdown

Issue 10788006: new site (Closed) Base URL: https://code.google.com/p/dartlang-site/@master
Patch Set: final patch Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/site/docs/sdk/index.html ('k') | src/site/docs/technical-overview/images/source-flow.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 --- 1 ---
2 layout: default 2 layout: default
3 title: "dart: The Standalone Dart VM" 3 title: "dart: The Standalone Dart VM"
4 description: "Use the standalone Dart VM to run Dart scripts, programs, and serv ers from the command line." 4 description: "Use the standalone Dart VM to run Dart scripts, programs, and serv ers from the command line."
5 --- 5 ---
6 6
7 # {{ page.title }} 7 # {{ page.title }}
8 8
9 This page tells you how to use the _dart_ tool (`bin/dart`) 9 This page tells you how to use the _dart_ tool (`bin/dart`)
10 to run Dart command-line apps 10 to run Dart command-line apps
11 such as server-side scripts, programs, and servers. 11 such as server-side scripts, programs, and servers.
12 During development, you also have the option to 12 During development, you also have the option to
13 [run command-line apps using Dart Editor](/docs/editor/#run). 13 [run command-line apps using Dart Editor](/docs/editor/#run).
14 14
15 The `bin/dart` executable is in the [Dart SDK](/docs/sdk/). 15 The `bin/dart` executable is in the [Dart SDK](/docs/sdk/).
16 You can either [download the SDK separately](/docs/sdk/#download) 16 You can either [download the SDK separately](/docs/sdk/#download)
17 or get it as part of the [Dart Editor package](/docs/editor/#download). 17 or get it as part of the [Dart Editor package](/docs/editor/#download).
18 18
19 ## Basic usage 19 ## Basic usage
20 20
21 Here's an example of running a Dart file on the command line: 21 Here's an example of running a Dart file on the command line:
22 22
23 {% highlight bash %} 23 {% highlight bash %}
24 $DART_SDK/bin/dart test.dart 24 YOUR_DART_SDK_DIR/bin/dart test.dart
25 {% endhighlight %} 25 {% endhighlight %}
26 26
27 27
28 ## Enabling type checks 28 ## Enabling type checks
29 29
30 Dart programs run in one of two modes: checked or production. 30 Dart programs run in one of two modes: checked or production.
31 In checked mode, assignments are dynamically checked, and 31 In checked mode, assignments are dynamically checked, and
32 certain violations of the type system raise exceptions at run time. 32 certain violations of the type system raise exceptions at run time.
33 In production mode, static type annotations have no 33 In production mode, static type annotations have no
34 effect. 34 effect.
35 35
36 During development, we recommend using checked mode. You can 36 During development, we recommend using checked mode. You can
37 run the VM in checked mode with a command-line flag: 37 run the VM in checked mode with a command-line flag:
38 38
39 {% highlight bash %} 39 {% highlight bash %}
40 $DART_SDK/bin/dart --enable_type_checks test.dart 40 YOUR_DART_SDK_DIR/bin/dart --enable-type-checks test.dart
41 {% endhighlight %} 41 {% endhighlight %}
42 42
43 ## Enabling assertions 43 ## Enabling assertions
44 44
45 An [assert statement](/docs/language-tour/#assert) 45 An [assert statement](/docs/language-tour/#assert)
46 checks a boolean condition, 46 checks a boolean condition,
47 raising an exception if the condition is false. 47 raising an exception if the condition is false.
48 Assertions do not run in production mode. 48 Assertions do not run in production mode.
49 We recommend that you enable assertions during development. 49 We recommend that you enable assertions during development.
50 50
51 You can enable assertions in the VM with a command-line flag: 51 You can enable assertions in the VM with a command-line flag:
52 52
53 {% highlight bash %} 53 {% highlight bash %}
54 $DART_SDK/bin/dart --enable_asserts test.dart 54 YOUR_DART_SDK_DIR/bin/dart --enable-asserts test.dart
55 {% endhighlight %} 55 {% endhighlight %}
56 56
57 57
58 ## Additional options 58 ## Additional options
59 59
60 Print all the command-line options with `--print-flags`: 60 Print all the command-line options with `--print-flags`:
61 61
62 {% highlight bash %} 62 {% highlight bash %}
63 $DART_SDK/bin/dart --print-flags 63 $DART_SDK/bin/dart --print-flags
64 {% endhighlight %} 64 {% endhighlight %}
65 65
66 66
OLDNEW
« no previous file with comments | « src/site/docs/sdk/index.html ('k') | src/site/docs/technical-overview/images/source-flow.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698