docs(cli): change URL path from /commands/ to /cli/

This commit is contained in:
Joakim Carlstein 2024-02-09 14:35:32 +01:00 committed by Joakim Carlstein
parent 0c597fd7a8
commit 1d33d65135
17 changed files with 25 additions and 20 deletions

View file

@ -0,0 +1,5 @@
---
'@emigrate/docs': major
---
Rename the URL path "/commands/" to "/cli/" to make it more clear that those pages are the documentation for the CLI. This change is a BREAKING CHANGE because it changes the URL path of the pages.

View file

@ -30,4 +30,4 @@
### Minor Changes
- cbc35bd: Add first version of the [Baseline guide](https://emigrate.dev/guides/baseline)
- cbc35bd: Document the new --limit, --from and --to options for the ["up" command](https://emigrate.dev/commands/up/)
- cbc35bd: Document the new --limit, --from and --to options for the ["up" command](https://emigrate.dev/cli/up/)

View file

@ -82,26 +82,26 @@ export default defineConfig({
items: [
{
label: 'Introduction',
link: '/commands/',
link: '/cli/',
},
{
label: 'Commands',
items: [
{
label: 'emigrate up',
link: '/commands/up/',
link: '/cli/up/',
},
{
label: 'emigrate list',
link: '/commands/list/',
link: '/cli/list/',
},
{
label: 'emigrate new',
link: '/commands/new/',
link: '/cli/new/',
},
{
label: 'emigrate remove',
link: '/commands/remove/',
link: '/cli/remove/',
},
],
},

View file

@ -55,7 +55,7 @@ The `remove` command is used to remove a migration from the history. This is use
The name of the migration file to remove, including the extension, e.g. `20200101000000_some_migration.js`, or a relative file path to a migration file to remove, e.g: `migrations/20200101000000_some_migration.js`.
Using relative file paths is useful in terminals that support autocomplete, and also when you copy and use the relative migration file path from the output of the <Link href="/commands/list/">`list`</Link> command.
Using relative file paths is useful in terminals that support autocomplete, and also when you copy and use the relative migration file path from the output of the <Link href="/cli/list/">`list`</Link> command.
## Options

View file

@ -113,8 +113,8 @@ CREATE TABLE public.posts (
### Log the baseline migration
For new environments this baseline migration will automatically be run when you run <Link href="/commands/up/">`emigrate up`</Link>.
For any existing environments you will need to run `emigrate up` with the <Link href="/commands/up/#--no-execution">`--no-execution`</Link> flag to prevent the migration from being executed and only log the migration:
For new environments this baseline migration will automatically be run when you run <Link href="/cli/up/">`emigrate up`</Link>.
For any existing environments you will need to run `emigrate up` with the <Link href="/cli/up/#--no-execution">`--no-execution`</Link> flag to prevent the migration from being executed and only log the migration:
<Tabs>
<TabItem label="npm">
@ -155,7 +155,7 @@ For any existing environments you will need to run `emigrate up` with the <Link
</TabItem>
</Tabs>
In case you have already added more migration files to your migration directory you can limit the "up" command to just log the baseline migration by specifying the <Link href="/commands/up/#-t---to-name">`--to`</Link> option:
In case you have already added more migration files to your migration directory you can limit the "up" command to just log the baseline migration by specifying the <Link href="/cli/up/#-t---to-name">`--to`</Link> option:
<Tabs>
<TabItem label="npm">
@ -198,7 +198,7 @@ In case you have already added more migration files to your migration directory
### Verify the baseline migration status
You can verify the status of the baseline migration by running the <Link href="/commands/list/">`emigrate list`</Link> command:
You can verify the status of the baseline migration by running the <Link href="/cli/list/">`emigrate list`</Link> command:
<Tabs>
<TabItem label="npm">
@ -251,5 +251,5 @@ Emigrate list v0.14.1 /your/project/path
### Happy migrating!
You can now start adding new migrations to your migration directory and run <Link href="/commands/up/">`emigrate up`</Link> to apply them to your database.
You can now start adding new migrations to your migration directory and run <Link href="/cli/up/">`emigrate up`</Link> to apply them to your database.
Which should be part of your CD pipeline to ensure that your database schema is always up to date in each environment.

View file

@ -47,7 +47,7 @@ After installing `tsx` you can load it in two ways.
#### Via CLI
Using the <Link href="/commands/up/#-i---import-module">`--import`</Link> flag you can load `tsx` before running your migration files.
Using the <Link href="/cli/up/#-i---import-module">`--import`</Link> flag you can load `tsx` before running your migration files.
<Tabs>
<TabItem label="npm">

View file

@ -22,5 +22,5 @@ The generator is responsible for generating migration files in a specific format
</CardGrid>
:::note
Instead of having to install a generator plugin, you can also use the much simpler <Link href="/commands/new/#-t---template-path">`--template`</Link> option to specify a custom template file for new migrations.
Instead of having to install a generator plugin, you can also use the much simpler <Link href="/cli/new/#-t---template-path">`--template`</Link> option to specify a custom template file for new migrations.
:::

View file

@ -79,4 +79,4 @@ A <Link href="/plugins/generators/">generator plugin</Link> for generating new m
</TabItem>
</Tabs>
For more information see <Link href="/commands/new/">the `new` command</Link>'s documentation.
For more information see <Link href="/cli/new/">the `new` command</Link>'s documentation.

View file

@ -79,4 +79,4 @@ The MySQL generator creates new migration files with the `.sql` extension. In th
</TabItem>
</Tabs>
For more information see <Link href="/commands/new/">the `new` command</Link>'s documentation.
For more information see <Link href="/cli/new/">the `new` command</Link>'s documentation.

View file

@ -79,4 +79,4 @@ The PostgreSQL generator creates new migration files with the `.sql` extension.
</TabItem>
</Tabs>
For more information see <Link href="/commands/new/">the `new` command</Link>'s documentation.
For more information see <Link href="/cli/new/">the `new` command</Link>'s documentation.

View file

@ -49,7 +49,7 @@ The reporter is included by default and does not need to be installed separately
</TabItem>
</Tabs>
See for instance the <Link href="/commands/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
See for instance the <Link href="/cli/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
### Via configuration file

View file

@ -87,7 +87,7 @@ The `@emigrate/reporter-` prefix is optional when using this reporter.
</TabItem>
</Tabs>
See for instance the <Link href="/commands/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
See for instance the <Link href="/cli/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
### Via configuration file

View file

@ -11,7 +11,7 @@ The reporter is included by default and does not need to be installed separately
## Usage
By default, Emigrate uses the "pretty" reporter, but it can also be explicitly set by using the <Link href="/commands/up/#-r---reporter-name">`--reporter`</Link> flag.
By default, Emigrate uses the "pretty" reporter, but it can also be explicitly set by using the <Link href="/cli/up/#-r---reporter-name">`--reporter`</Link> flag.
<Tabs>
<TabItem label="npm">