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

Side by Side Diff: app/views/doc/pub-serve.html

Issue 162403002: Remove docs and point to ones on dartlang.org. (Closed) Base URL: https://github.com/dart-lang/pub-dartlang.git@master
Patch Set: Fit in 80 columns. Created 6 years, 10 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 | « app/views/doc/pub-lish.html ('k') | app/views/doc/pub-upgrade.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <pre><code>$ pub serve [--port &lt;number&gt;]
2 </code></pre>
3
4 <p>This command starts up a <em>development server</em>, or <em>dev server</em>,
5 for your Dart web app. The dev server is an HTTP server on localhost
6 that serves up your web app&rsquo;s <a href="glossary.html#asset">assets</a>.</p >
7
8 <p>Start the dev server from the directory that contains your web app&rsquo;s
9 <code>pubspec.yaml</code> file:</p>
10
11 <pre><code>$ cd ~/dart/helloworld
12 $ pub serve
13 Serving helloworld on http://localhost:8080
14 </code></pre>
15
16 <p>The dev server doesn&rsquo;t just serve up assets, it produces them by runnin g
17 <a href="glossary.html#transformer">transformers</a>. A transformer converts inp ut
18 assets (such as Dart files or Polymer-formatted HTML) into output assets
19 (such as JavaScript and HTML).</p>
20
21 <p>These output assets aren&rsquo;t in the file system; they exist only in the d ev
22 server. When you&rsquo;re ready to deploy, generate output files by running
23 <a href="pub-build.html"><code>pub build</code></a>.</p>
24
25 <p>Pub automatically includes a dart2js transformer that compiles your Dart code
26 to JavaScript. With this, you can change some Dart code, refresh your
27 non-Dartium browser, and immediately see the changes.</p>
28
29 <p>See <a href="assets-and-transformers.html">Assets and Transformers</a> for
30 information on:</p>
31
32 <ul>
33 <li>Where in your package to put assets.</li>
34 <li>What URLs to use when referring to assets.</li>
35 <li>How to use <code>pubspec.yaml</code> to specify which transformers run, an d in
36 what order.</li>
37 </ul>
38
39 <h2 id="options">Options</h2>
40
41 <h3 id="port"><code>--port</code></h3>
42
43 <p>By default the dev server uses <code>http://localhost:8080</code>. To change the port
44 number, use the <code>--port</code> option:</p>
45
46 <pre><code>$ pub serve --port 9080
47 Serving helloworld on http://localhost:9080
48 </code></pre>
49
50 <h3 id="modemode"><code>--mode=&lt;mode&gt;</code></h3>
51
52 <p>Specifies a transformation mode. Typical values are &ldquo;debug&rdquo; and & ldquo;release&rdquo;, but
53 any word is allowed. Transformers may use this to change how they behave.</p>
54
55 <p>If set to &ldquo;release&rdquo; pub will generate minified JavaScript using d art2js.
56 Otherwise, it generates it unminified. Also, in release mode, Pub will not
57 include any source .dart files in the resulting build output since they have
58 been compiled to JavaScript. In any other mode, the raw Dart files will be
59 included.</p>
60
61 <p>If omitted, it defaults to &ldquo;debug&rdquo;.</p>
62
63 <h2 id="what-about-dart-editors-server">What about Dart Editor&rsquo;s server?</ h2>
64
65 <p>Dart Editor has its own dev server. We plan to unify it with the
66 pub dev server soon.</p>
OLDNEW
« no previous file with comments | « app/views/doc/pub-lish.html ('k') | app/views/doc/pub-upgrade.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698