| Index: app/views/doc/pubspec.html
|
| diff --git a/app/views/doc/pubspec.html b/app/views/doc/pubspec.html
|
| deleted file mode 100644
|
| index cd990f0e8066737be00b8160bf7d6a01d3b26e80..0000000000000000000000000000000000000000
|
| --- a/app/views/doc/pubspec.html
|
| +++ /dev/null
|
| @@ -1,174 +0,0 @@
|
| -<ol class="toc">
|
| - <li><a href="#name">Name</a></li>
|
| - <li><a href="#version">Version</a></li>
|
| - <li><a href="#description">Description</a></li>
|
| - <li><a href="#authorauthors">Author/Authors</a></li>
|
| - <li><a href="#homepage">Homepage</a></li>
|
| - <li><a href="#documentation">Documentation</a></li>
|
| - <li><a href="#dependencies">Dependencies</a></li>
|
| - <li><a href="#sdk-constraints">SDK constraints</a></li>
|
| -</ol>
|
| -
|
| -<p>Every pub package needs some metadata so it can specify its
|
| -<a href="glossary.html#dependency">dependencies</a>. Pub packages that are shared with
|
| -others also need to provide some other information so users can discover them.
|
| -Pub stores this in a file named <code>pubspec.yaml</code>, which (naturally) is written in
|
| -the <a href="http://www.yaml.org/">YAML</a> language.</p>
|
| -
|
| -<p>At the top level are a series of fields. The currently supported ones are:</p>
|
| -
|
| -<dl class="dl-horizontal">
|
| - <dt>Name</dt>
|
| - <dd>Required for every package.</dd>
|
| - <dt>Version</dt>
|
| - <dd>Required for packages that will be hosted on pub.dartlang.org.</dd>
|
| - <dt>Description</dt>
|
| - <dd>Required for packages that will be hosted on pub.dartlang.org.</dd>
|
| - <dt>Author/Authors</dt>
|
| - <dd>Optional.</dd>
|
| - <dt>Homepage</dt>
|
| - <dd>Optional.</dd>
|
| - <dt>Documentation</dt>
|
| - <dd>Optional.</dd>
|
| - <dt>Dependencies</dt>
|
| - <dd>Can be omitted if your package has no dependencies.</dd>
|
| - <dt>Dev dependencies</dt>
|
| - <dd>Can be omitted if your package has no dev dependencies.</dd>
|
| -</dl>
|
| -
|
| -<p>All other fields will be ignored. A simple but complete pubspec looks something
|
| -like this:</p>
|
| -
|
| -<div class="highlight"><pre><code class="yaml"><span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">newtify</span>
|
| -<span class="l-Scalar-Plain">version</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">1.2.3</span>
|
| -<span class="l-Scalar-Plain">description</span><span class="p-Indicator">:</span> <span class="p-Indicator">></span>
|
| - <span class="no">Have you been turned into a newt? Would you like to be? This</span>
|
| - <span class="no">package can help: it has all of the newt-transmogrification</span>
|
| - <span class="no">functionality you've been looking for.</span>
|
| -<span class="l-Scalar-Plain">author</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Nathan Weizenbaum <nweiz@google.com></span>
|
| -<span class="l-Scalar-Plain">homepage</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">http://newtify.dartlang.org</span>
|
| -<span class="l-Scalar-Plain">documentation</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">http://docs.newtify.com</span>
|
| -<span class="l-Scalar-Plain">dependencies</span><span class="p-Indicator">:</span>
|
| - <span class="l-Scalar-Plain">efts</span><span class="p-Indicator">:</span> <span class="s">'>=2.0.4</span><span class="nv"> </span><span class="s"><3.0.0'</span>
|
| - <span class="l-Scalar-Plain">transmogrify</span><span class="p-Indicator">:</span> <span class="s">'>=0.4.0'</span>
|
| -<span class="l-Scalar-Plain">dev_dependencies</span><span class="p-Indicator">:</span>
|
| - <span class="l-Scalar-Plain">unittest</span><span class="p-Indicator">:</span> <span class="s">'>=0.6.0'</span>
|
| -</code></pre></div>
|
| -
|
| -<h2 id="name">Name</h2>
|
| -
|
| -<p>Every package needs a name. When your stellar code gets props on
|
| -the world stage, this is what they’ll be hollering. Also, it’s how other
|
| -packages will refer to yours, and how it will appear here, should you publish
|
| -it.</p>
|
| -
|
| -<p>It should be all lowercase, with underscores to separate words,
|
| -<code>just_like_this</code>. Stick with basic Latin letters and Arabic digits:
|
| -<code>[a-z0-9_]</code> and ensure that it’s a valid Dart identifier (i.e. doesn’t start
|
| -with digits and isn’t a reserved word).</p>
|
| -
|
| -<p>Try to pick a name that is clear, terse, and not already in use. A quick search
|
| -<a href="/packages">here</a> to make sure nothing else is using your name can save you
|
| -heartache later.</p>
|
| -
|
| -<h2 id="version">Version</h2>
|
| -
|
| -<p>Every package has a version. A version number is required to host your package
|
| -here, but can be omitted for local-only packages. If you omit it, your package
|
| -is implicitly versioned <code>0.0.0</code>.</p>
|
| -
|
| -<p>No one really gets excited about versioning, but it’s a necessary evil for
|
| -reusing code while letting it evolve quickly. A version number is three numbers
|
| -separated by dots, like <code>0.2.43</code>. It can also optionally have a build
|
| -(<code>+hotfix.oopsie</code>) or pre-release (<code>-alpha.12</code>) suffix.</p>
|
| -
|
| -<p>Each time you publish your package, you will publish it at a specific version.
|
| -Once that’s been done, consider it hermetically sealed: you can’t touch it
|
| -anymore. To make more changes, you’ll need a new version.</p>
|
| -
|
| -<p>When you select a version, follow <a href="http://semver.org/">semantic versioning</a>. When you do, the
|
| -clouds will part and sunshine will pour into your soul. If you don’t, prepare
|
| -yourself for hordes of angry users.</p>
|
| -
|
| -<h2 id="description">Description</h2>
|
| -
|
| -<p>This is optional for your own personal packages, but if you intend to share
|
| -your package with the world (and you should because, let’s be honest with
|
| -ourselves, it’s a thing of beauty) you must provide a description. This should
|
| -be relatively short—a few sentences, maybe a whole paragraph—and
|
| -tells a casual reader what they might want to know about your package.</p>
|
| -
|
| -<p>Think of the description as the sales pitch for your package. Users will see it
|
| -when they <a href="/packages">browse for packages</a>. It should be simple plain text:
|
| -no markdown or HTML. That’s what your README is for.</p>
|
| -
|
| -<h2 id="authorauthors">Author/Authors</h2>
|
| -
|
| -<p>You’re encouraged to use these fields to describe the author(s) of your package
|
| -and provide contact information. <code>author</code> should be used if your package has a
|
| -single author, while <code>authors</code> should be used with a YAML list if more than one
|
| -person wrote the package. Each author can either be a single name (e.g. <code>Nathan
|
| -Weizenbaum</code>) or a name and an email address (e.g. <code>Nathan Weizenbaum
|
| -<nweiz@google.com></code>). For example:</p>
|
| -
|
| -<div class="highlight"><pre><code class="yaml"><span class="l-Scalar-Plain">authors</span><span class="p-Indicator">:</span>
|
| -<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">Nathan Weizenbaum <nweiz@google.com></span>
|
| -<span class="p-Indicator">-</span> <span class="l-Scalar-Plain">Bob Nystrom <rnystrom@google.com></span>
|
| -</code></pre></div>
|
| -
|
| -<p>If anyone uploads your package here, we will show this email address so make
|
| -sure you’re OK with that.</p>
|
| -
|
| -<h2 id="homepage">Homepage</h2>
|
| -
|
| -<p>This should be a URL pointing to the website for your package. For
|
| -<a href="#hosted-packages">hosted packages</a>, this URL will be linked from the
|
| -package’s page. While this is technically optional <em>please do</em> provide one. It
|
| -helps users understand where your package is coming from. If nothing else, you
|
| -can always use the URL where you host the source code:
|
| -<a href="http://github.com">GitHub</a>, <a href="http://code.google.com/">code.google.com</a>,
|
| -whatever.</p>
|
| -
|
| -<h2 id="documentation">Documentation</h2>
|
| -
|
| -<p>Some packages may have a site that hosts documentation separate from the main
|
| -homepage. If your package has that, you can also add a <code>documentation:</code> field
|
| -with that URL. If provided, a link to it will be shown on your package’s page.</p>
|
| -
|
| -<h2 id="dependencies">Dependencies</h2>
|
| -
|
| -<div class="learn-more">
|
| - <a href="/doc/dependencies.html">
|
| - Learn more about dependencies →
|
| - </a>
|
| -</div>
|
| -
|
| -<p>Finally, the pubspec’s <em>raison d’ĂȘtre</em>: <a href="glossary.html#dependency">dependencies</a>. Here,
|
| -you list each package that your package needs in order to work.</p>
|
| -
|
| -<p>There are two separate sections. Dependencies under <code>dependencies:</code> are
|
| -“regular” dependencies. They are packages that anyone using your package will
|
| -also need. Dependencies under <code>dev_dependencies</code> are
|
| -<a href="glossary.html#dev-dependency">dev dependencies</a>. These are packages that are
|
| -only needed in the development of your package itself.</p>
|
| -
|
| -<h2 id="sdk-constraints">SDK constraints</h2>
|
| -
|
| -<p>A package can indicate which versions of its dependencies it supports, but there
|
| -is also another implicit dependency all packages have: the Dart SDK itself.
|
| -Since the Dart platform evolves over time, a package may only work with certain
|
| -versions of it.</p>
|
| -
|
| -<p>A package can specify that using an <em>SDK constraint</em>. This goes inside a
|
| -separate top-level “environment” field in the pubspec and uses the same
|
| -<a href="dependencies.html#version-constraints">version constraint</a> syntax as
|
| -dependencies. For example, this constraint says that this package works with any
|
| -Dart SDK from 0.3.4 or later:</p>
|
| -
|
| -<div class="highlight"><pre><code class="yaml"><span class="l-Scalar-Plain">environment</span><span class="p-Indicator">:</span>
|
| - <span class="l-Scalar-Plain">sdk</span><span class="p-Indicator">:</span> <span class="s">">=0.3.4"</span>
|
| -</code></pre></div>
|
| -
|
| -<p>Pub will try to find the latest version of a package whose SDK constraint works
|
| -with the version of the Dart SDK that you have installed.</p>
|
| -
|
|
|