Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
BryceRussell committed Apr 19, 2024
1 parent a216a97 commit 69a7620
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 69 deletions.
4 changes: 3 additions & 1 deletion .changeset/blue-cycles-swim.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
36 changes: 1 addition & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Add custom file based routing directories in Astro

### Examples

#### Integration
#### Astro Integration

```ts
// astro.config.mjs
Expand Down Expand Up @@ -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()

}
}
}
})
```

33 changes: 0 additions & 33 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 69a7620

Please sign in to comment.