From 69a762044821da86013132856ac85f9118a0e96c Mon Sep 17 00:00:00 2001 From: Bryce Russell Date: Fri, 19 Apr 2024 16:58:43 -0500 Subject: [PATCH] Update READMEs --- .changeset/blue-cycles-swim.md | 4 +++- README.md | 36 +--------------------------------- package/README.md | 33 ------------------------------- 3 files changed, 4 insertions(+), 69 deletions(-) diff --git a/.changeset/blue-cycles-swim.md b/.changeset/blue-cycles-swim.md index 5ce2bfd..3fe9e14 100644 --- a/.changeset/blue-cycles-swim.md +++ b/.changeset/blue-cycles-swim.md @@ -2,7 +2,9 @@ "astro-pages": minor --- -Added a build step and restructured the package. All exports except for the root module have been removed: +- Added a build step and restructured the package. +- The `astro-integration-kit` plugin was removed, use the utility instead +- All exports from `astro-pages/plugins` and `astro-pages/utils` have been removed, import from `astro-pages` instead: ```ts // Use the types diff --git a/README.md b/README.md index 21f2fab..d897c35 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Add custom file based routing directories in Astro ### Examples -#### Integration +#### Astro Integration ```ts // astro.config.mjs @@ -53,37 +53,3 @@ export default function(options): AstroIntegration { } } ``` - -#### Astro Integration Kit Plugin - -```ts -// package/index.ts -import { defineIntegration } from "astro-integration-kit"; -import addPageDirPlugin from "astro-pages/plugins/astro-integration-kit.ts"; - -export default defineIntegration({ - name: "my-integration", - plugins: [addPageDirPlugin], - setup() { - return { - "astro:config:setup": ({ addPageDir }) => { - - const pageConfig = { - cwd: import.meta.url, - dir: "pages" - } - - const { - pages, - injectPages - } = addPageDir(pageConfig) - - // Injects pages inside 'package/pages' - injectPages() - - } - } - } -}) -``` - diff --git a/package/README.md b/package/README.md index 1778388..0a5b556 100644 --- a/package/README.md +++ b/package/README.md @@ -147,39 +147,6 @@ export default function(options): AstroIntegration { } ``` -**Use as a [`astro-integration-kit`](https://astro-integration-kit.netlify.app/getting-started/installation/) plugin** - -```js -// package/index.ts -import { defineIntegration } from "astro-integration-kit"; -import addPageDirPlugin from "astro-pages/plugins/astro-integration-kit.ts"; - -export default defineIntegration({ - name: "my-integration", - plugins: [addPageDirPlugin], - setup() { - return { - "astro:config:setup": ({ addPageDir }) => { - - const pageConfig = { - cwd: import.meta.url, - dir: "pages" - } - - const { - pages, - injectPages - } = addPageDir(pageConfig) - - // Injects pages inside 'package/pages' - injectPages() - - } - } - } -}) -``` - ## `Option` Reference ### `dir`