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

Side by Side Diff: app/views/doc/pub-build.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/package-layout.html ('k') | app/views/doc/pub-cache.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 build [--mode=&lt;mode&gt;]
2 </code></pre>
3
4 <p>Use <code>pub build</code> when you&rsquo;re ready to deploy your web app. Wh en you run
5 <code>pub build</code>, it generates the <a href="glossary.html#asset">assets</a > for the current
6 package and all of its dependencies, putting them into a new directory
7 named <code>build</code>.</p>
8
9 <p>To use <code>pub build</code>, just run it in your package&rsquo;s root direc tory. For example:</p>
10
11 <pre><code>$ cd ~/dart/helloworld
12 $ pub build
13 Building helloworld......
14 Built 5 files!
15 </code></pre>
16
17 <p>If the build directory already exists, <code>pub build</code> deletes it and then creates
18 it again.</p>
19
20 <p>To generate assets, <code>pub build</code> uses
21 <a href="glossary.html#transformer">transformers</a>. Any source assets that are n&rsquo;t
22 transformed are copied, as is, into the build directory or one of its
23 subdirectories. Pub also automatically compiles your Dart application to
24 JavaScript using dart2js.</p>
25
26 <p>See <a href="assets-and-transformers.html">Assets and Transformers</a> for in formation on:</p>
27
28 <ul>
29 <li>Where in your package to put assets.</li>
30 <li>What URLs to use when referring to assets.</li>
31 <li>How to use <code>pubspec.yaml</code> to specify which transformers run, an d in
32 what order.</li>
33 </ul>
34
35 <p>Also see <a href="pub-serve.html"><code>pub serve</code></a>. With <code>pub serve</code>, you can run a
36 development server that continuously generates and serves assets.</p>
37
38 <h2 id="options">Options</h2>
39
40 <h3 id="modemode"><code>--mode=&lt;mode&gt;</code></h3>
41
42 <p>Specifies a transformation mode. Typical values are &ldquo;debug&rdquo; and & ldquo;release&rdquo;, but
43 any word is allowed. Transformers may use this to change how they behave.</p>
44
45 <p>If set to &ldquo;release&rdquo; pub will generate minified JavaScript using d art2js.
46 Otherwise, it generates it unminified. Also, in release mode, Pub will not
47 include any source .dart files in the resulting build output since they have
48 been compiled to JavaScript. In any other mode, the raw Dart files will be
49 included.</p>
50
51 <p>If omitted, it defaults to &ldquo;release&rdquo;.</p>
OLDNEW
« no previous file with comments | « app/views/doc/package-layout.html ('k') | app/views/doc/pub-cache.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698