Skip to content

Commit

Permalink
Move general packages doc out of guides directory (#6216)
Browse files Browse the repository at this point in the history
Contributes to #5767
  • Loading branch information
parlough authored Nov 18, 2024
1 parent 530a3f9 commit a838de8
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 27 deletions.
10 changes: 5 additions & 5 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
{ "source": "/docs/tutorials/httpserver", "destination": "/tutorials/server/httpserver", "type": 301 },
{ "source": "/docs/tutorials/indexeddb{,/**}", "destination": "https://api.dart.dev/stable/dart-indexed_db/dart-indexed_db-library.html", "type": 301 },
{ "source": "/docs/tutorials/remove-elements", "destination": "/library/dart-html", "type": 301 },
{ "source": "/docs/tutorials/shared-pkgs", "destination": "/guides/packages", "type": 301 },
{ "source": "/docs/tutorials/shared-pkgs", "destination": "/tools/pub/packages", "type": 301 },
{ "source": "/docs/tutorials/streams", "destination": "/libraries/async/using-streams", "type": 301 },
{ "source": "/docs/tutorials{,/**}", "destination": "/tutorials", "type": 301 },
{ "source": "/docs{,/**}", "destination": "/guides", "type": 301 },
Expand Down Expand Up @@ -236,6 +236,7 @@
{ "source": "/guides/libraries/c-interop", "destination": "/interop/c-interop", "type": 301 },
{ "source": "/guides/libraries/writing-package-pages", "destination": "/tools/pub/writing-package-pages", "type": 301 },
{ "source": "/guides/libraries/useful-libraries", "destination": "/resources/useful-packages", "type": 301 },
{ "source": "/guides/packages", "destination": "/tools/pub/packages", "type": 301 },
{ "source": "/guides/platforms", "destination": "/overview#platform", "type": 301 },
{ "source": "/guides/whats-new", "destination": "/resources/whats-new", "type": 301 },
{ "source": "/install", "destination": "/get-dart", "type": 301 },
Expand Down Expand Up @@ -361,7 +362,7 @@
{ "source": "/support{,/**}", "destination": "/community", "type": 301 },

{ "source": "/to/doc-comment-references", "destination": "/tools/doc-comments/references", "type": 301 },
{ "source": "/to/enforce-lockfile", "destination": "/guides/packages#get-dependencies-for-production", "type": 301 },
{ "source": "/to/enforce-lockfile", "destination": "/tools/pub/packages#get-dependencies-for-production", "type": 301 },
{ "source": "/to/main-function", "destination": "/language/functions#main", "type": 301 },
{ "source": "/to/web-debug-extension", "destination": "https://chromewebstore.google.com/detail/dart-debug-extension/eljbmlghnomdjgdjmbdekegdkbabckhm", "type": 301 },

Expand All @@ -388,15 +389,14 @@
{ "source": "/tools/editor{,/**}", "destination": "/tools", "type": 301 },
{ "source": "/tools/faq", "destination": "/resources/faq", "type": 301 },
{ "source": "/tools/observatory{,/**}", "destination": "/tools/dart-devtools", "type": 301 },
{ "source": "/tools/pub", "destination": "/tools/pub/cmd", "type": 301 },
{ "source": "/tools/pub/assets-and-*transformers", "destination": "https://github.com/dart-lang/build", "type": 301 },
{ "source": "/tools/pub/cmd/pub-build", "destination": "/tools/webdev", "type": 301 },
{ "source": "/tools/pub/cmd/pub-run", "destination": "/tools/dart-run", "type": 301 },
{ "source": "/tools/pub/cmd/pub-serve", "destination": "/tools/webdev", "type": 301 },
{ "source": "/tools/pub/cmd/pub-uploader", "destination": "/tools/pub/publishing#uploaders", "type": 301 },
{ "source": "/tools/pub/create-library-packages", "destination": "/guides/libraries/create-packages", "type": 301 },
{ "source": "/tools/pub/faq", "destination": "/tools/faq#pub", "type": 301 },
{ "source": "/tools/pub/get-started", "destination": "/guides/packages", "type": 301 },
{ "source": "/tools/pub/get-started", "destination": "/tools/pub/packages", "type": 301 },
{ "source": "/tools/pub/installing", "destination": "/tools/pub/environment-variables", "type": 301 },
{ "source": "/tools/pub/transformers{,/**}", "destination": "https://github.com/dart-lang/build", "type": 301 },
{ "source": "/tools/sdk/archive", "destination": "/get-dart/archive", "type": 301 },
Expand All @@ -408,7 +408,7 @@
{ "source": "/tutorials/language/futures", "destination": "/libraries/async/async-await", "type": 301 },
{ "source": "/tutorials/language/streams", "destination": "/libraries/async/using-streams", "type": 301 },
{ "source": "/tutorials/libraries", "destination": "/libraries", "type": 301 },
{ "source": "/tutorials/libraries/shared-pkgs", "destination": "/guides/packages", "type": 301 },
{ "source": "/tutorials/libraries/shared-pkgs", "destination": "/tools/pub/packages", "type": 301 },
{ "source": "/tutorials/web", "destination": "/web/get-started", "type": 301 },
{ "source": "/tutorials/web/fetch-data", "destination": "/tutorials/server/fetch-data", "type": 301 },
{ "source": "/tutorials/web/get-started", "destination": "/web/get-started", "type": 301 },
Expand Down
2 changes: 1 addition & 1 deletion src/_data/side-nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
expanded: false
children:
- title: How to use packages
permalink: /guides/packages
permalink: /tools/pub/packages
- title: Commonly used packages
permalink: /resources/useful-packages
- title: Creating packages
Expand Down
4 changes: 2 additions & 2 deletions src/content/guides/libraries/create-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Creating packages
description: Learn how to create packages in Dart.
---

The Dart ecosystem uses [packages](/guides/packages)
The Dart ecosystem uses [packages](/tools/pub/packages)
to share software such as libraries and tools.
This page tells you how to create a standard shared
[package](/tools/pub/glossary#package).
Expand Down Expand Up @@ -300,7 +300,7 @@ Use the following resources to learn more about packages:

* [Libraries and imports](/language/libraries) covers
using library files.
* The [package](/guides/packages) documentation is useful, particularly the
* The [package](/tools/pub/packages) documentation is useful, particularly the
[package layout conventions](/tools/pub/package-layout).
* [What not to commit](private-files)
covers what should not be checked into a source code repository.
Expand Down
2 changes: 1 addition & 1 deletion src/content/language/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ are a unit of privacy: identifiers that start with an underscore (`_`)
are visible only inside the library. *Every Dart file (plus its parts) is a
[library][]*, even if it doesn't use a [`library`](#library-directive) directive.

Libraries can be distributed using [packages](/guides/packages).
Libraries can be distributed using [packages](/tools/pub/packages).

:::note
To learn why Dart uses underscores instead of access modifier keywords
Expand Down
2 changes: 1 addition & 1 deletion src/content/language/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ and a `fromJson` deserialization constructor.
```

[SDK constraint]: /tools/pub/pubspec#sdk-constraints
[Add the package]: /guides/packages
[Add the package]: /tools/pub/packages
[Enable the experiment]: /tools/experiment-flags#using-experiment-flags-with-the-dart-analyzer-command-line-and-ide

### Use the macro
Expand Down
4 changes: 2 additions & 2 deletions src/content/resources/dart-3-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The potentially breaking changes listed below fall into one of two categories:
language version is set to >= Dart 3.0.
The [language version](/guides/language/evolution#language-version-numbers)
is derived from the `sdk` lower-constraint in the
[`pubspec.yaml` file](/guides/packages#creating-a-pubspec).
[`pubspec.yaml` file](/tools/pub/packages#creating-a-pubspec).
An SDK constraint like this does *not* apply the Dart 3 versioned changes:

```yaml
Expand All @@ -52,7 +52,7 @@ later are likely backwards compatible with Dart 3.
This is possible for any package where
the lower bound of the SDK constraint is 2.12.0 or higher.
[Dart's pub tool](/guides/packages) allows resolution even when
[Dart's pub tool](/tools/pub/packages) allows resolution even when
the upper bound is limited to versions below 3.0.0.
For example, a package with the following constraint
will be allowed to resolve with a Dart 3.x SDK,
Expand Down
2 changes: 1 addition & 1 deletion src/content/resources/useful-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >-
{% assign pubpkg = site.pub-pkg %}

This page lists some of the most popular and useful
[packages](/guides/packages) that Dart developers have published.
[packages](/tools/pub/packages) that Dart developers have published.
To find more packages—and search [core libraries](/libraries)
as well—use the [pub.dev site.]({{pub}})

Expand Down
2 changes: 1 addition & 1 deletion src/content/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ mailing list.
[Google's security philosophy]: https://www.google.com/about/appsecurity/
[https://g.co/vulnz]: https://g.co/vulnz
[repos]: {{site.repo.dart.org}}/
[upgrade your package dependencies]: /guides/packages#upgrading-a-dependency
[upgrade your package dependencies]: /tools/pub/packages#upgrading-a-dependency
2 changes: 1 addition & 1 deletion src/content/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The Dart SDK includes the following general-purpose `dart` tool:
[`dart`](/tools/dart-tool)
: A command-line interface (CLI) for creating, formatting, analyzing,
testing, documenting, compiling, and running Dart code,
as well as working with the [pub package manager](/guides/packages).
as well as working with the [pub package manager](/tools/pub/packages).


### Debugging
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/cmd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: dart pub
description: The command-line interface for pub, a package management tool for Dart.
---

The [pub package manager](/guides/packages) has a command-line interface
The [pub package manager](/tools/pub/packages) has a command-line interface
that works with either the
[`flutter` tool][flutter-cli] or the [`dart` tool][dart-cli].
With either tool, add the `pub` command followed by
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/cmd/pub-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ package has changed.

Useful for CI or deploying to production.

Read [Get dependencies for production](/guides/packages#get-dependencies-for-production)
Read [Get dependencies for production](/tools/pub/packages#get-dependencies-for-production)
for more details.

{% render 'pub-problems.md' %}
2 changes: 1 addition & 1 deletion src/content/tools/pub/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ to differentiate versions. <a href="#fnref:semver">↩</a>
</aside>

[GitHub SSH]: https://help.github.com/articles/connecting-to-github-with-ssh/
[pub package manager]: /guides/packages
[pub package manager]: /tools/pub/packages
[`dart pub get`]: /tools/pub/cmd/pub-get
[`dart pub outdated`]: /tools/pub/cmd/pub-outdated
[`dart pub upgrade`]: /tools/pub/cmd/pub-upgrade
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The following terms are used in the documentation for
[package management][] and
the [pub tool][].

[package management]: /guides/packages
[package management]: /tools/pub/packages
[pub tool]: /tools/pub/cmd

## Application package
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/package-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: >-
Dart's package management tool, pub.
---

When you build a [pub package](/guides/packages),
When you build a [pub package](/tools/pub/packages),
we encourage you to follow the conventions that this page describes.
They describe how you organize the files and directories within your
package, and how to name things.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/content/tools/pub/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ If you change your mind, you can remove the discontinued mark at any time.
[Markdown]: {{site.pub-pkg}}/markdown
[pkg-layout]: /tools/pub/package-layout
[policy]: {{site.pub}}/policy
[pub]: /guides/packages
[pub]: /tools/pub/packages
[`dart pub publish`]: /tools/pub/cmd/pub-lish
[pubspec]: /tools/pub/pubspec
[semver]: https://semver.org/spec/v2.0.0-rc.1.html
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/pubspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: The pubspec file
description: Reference guide for the fields in pubspec.yaml.
---

Every [pub package](/guides/packages) needs some metadata so it can specify its
Every [pub package](/tools/pub/packages) needs some metadata so it can specify its
[dependencies](/tools/pub/glossary#dependency). Pub packages that are shared with
others also need to provide some other information so users can discover them.
All of this metadata goes in the package's _pubspec:_
Expand Down
2 changes: 1 addition & 1 deletion src/content/tools/pub/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ consult the [PubGrub][pubgrub] article on Medium.

[immediate-dep]: /tools/pub/glossary#immediate-dependency
[transitive-dep]: /tools/pub/glossary#transitive-dependency
[pub]: /guides/packages
[pub]: /tools/pub/packages
[npm]: https://npmjs.org/
[bundler]: https://bundler.io
[caret-syntax]: /tools/pub/dependencies#caret-syntax
Expand Down
2 changes: 1 addition & 1 deletion src/content/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ which are fundamental to most Dart programs.
<p>Use streams to manage sequences of data.</p>
</div>
<div class="card">
<h3><a href="/guides/packages">How to use packages</a></h3>
<h3><a href="/tools/pub/packages">How to use packages</a></h3>
<p>Organize and share code at the
<a href="{{site.pub}}">pub.dev site.</a></p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/content/tutorials/server/cmdline.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Future<void> _handleError(String path) async {

You might notice that dcat depends on a package named **args**.
To get the args package, use the
[pub package manager](/guides/packages).
[pub package manager](/tools/pub/packages).

A real app has tests, license files, dependency files, examples, and so on.
For the first app though, we can easily create only what is necessary
Expand Down Expand Up @@ -172,7 +172,7 @@ with the [`dart create`](/tools/dart-create) command.

:::note
To learn more about using packages and organizing your code, check out
[How to use packages](/guides/packages) and
[How to use packages](/tools/pub/packages) and
[Package layout conventions](/tools/pub/package-layout).
:::

Expand Down
2 changes: 1 addition & 1 deletion src/content/tutorials/server/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This command creates a small Dart app that has the following:
* An additional Dart file, `lib/cli.dart`, that contains the functionality of
the app and is imported by the `cli.dart` file.
* A pubspec file, `pubspec.yaml`, that contains the app's metadata, including
information about which [packages](/guides/packages) the app depends on
information about which [packages](/tools/pub/packages) the app depends on
and which versions of those packages are required.

:::note
Expand Down

0 comments on commit a838de8

Please sign in to comment.