diff --git a/docs/src/content/docs/plugins/generators/index.mdx b/docs/src/content/docs/plugins/generators/index.mdx new file mode 100644 index 0000000..d7f9104 --- /dev/null +++ b/docs/src/content/docs/plugins/generators/index.mdx @@ -0,0 +1,24 @@ +--- +title: "Generator Plugins" +--- + +import { LinkCard, CardGrid } from '@astrojs/starlight/components'; + +A generator plugin is a plugin that generates new migration files. +They are responsible for both generating the new file's name and its contents. + +:::tip[Did you know?] +Many of the [Loader Plugins](/plugins/loaders/) usually include a generator plugin as well. +The generator is responsible for generating migration files in a specific format and the loader is responsible for loading the same format. +::: + +## Available Generator Plugins + + + + + + +:::note +Instead of having to install a generator plugin, you can also use the much simpler [`--template`](/commands/new/#t---template-path) option to specify a custom template file for new migrations. +::: diff --git a/docs/src/content/docs/plugins/generators/js.mdx b/docs/src/content/docs/plugins/generators/js.mdx new file mode 100644 index 0000000..dd2ae37 --- /dev/null +++ b/docs/src/content/docs/plugins/generators/js.mdx @@ -0,0 +1,35 @@ +--- +title: "JavaScript Generator" +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +A [generator plugin](/plugins/generators/) for generating new migration files in JavaScript. + +## Installation + + + + ```bash + npm install @emigrate/plugin-generate-js + ``` + + + ```bash + pnpm add @emigrate/plugin-generate-js + ``` + + + ```bash + yarn add @emigrate/plugin-generate-js + ``` + + + +## Usage + +```bash +emigrate new --plugin generate-js create some fancy table +``` + +For more information see [the `new` command](/commands/new/)'s documentation. diff --git a/docs/src/content/docs/plugins/generators/mysql.mdx b/docs/src/content/docs/plugins/generators/mysql.mdx new file mode 100644 index 0000000..1ee069a --- /dev/null +++ b/docs/src/content/docs/plugins/generators/mysql.mdx @@ -0,0 +1,35 @@ +--- +title: "MySQL Generator" +--- + +import { Tabs, TabItem } from '@astrojs/starlight/components'; + +The MySQL generator creates new migration files with the `.sql` extension. In the same package you can find the [MySQL Loader](/plugins/loaders/mysql/) and the [MySQL Storage](/plugins/storage/mysql/). + +## Installation + + + + ```bash + npm install @emigrate/mysql + ``` + + + ```bash + pnpm add @emigrate/mysql + ``` + + + ```bash + yarn add @emigrate/mysql + ``` + + + +## Usage + +```bash +emigrate new --plugin mysql create some fancy table +``` + +For more information see [the `new` command](/commands/new/)'s documentation.