Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Steps component to publish-to-npm.mdx #8086

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/content/docs/en/reference/publish-to-npm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Publish to NPM
description: Learn how to publish Astro components to NPM
i18nReady: true
---
import { Steps } from '@astrojs/starlight/components';
import { FileTree } from '@astrojs/starlight/components';

Building a new Astro component? **Publish it to [npm!](https://npmjs.com/)**
Expand Down Expand Up @@ -233,17 +234,22 @@ Astro does not currently ship a test runner. _(If you are interested in helping

In the meantime, our current recommendation for testing is:

<Steps>
1. Add a test `fixtures` directory to your `demo/src/pages` directory.

2. Add a new page for every test that you'd like to run.

3. Each page should include some different component usage that you'd like to test.

4. Run `astro build` to build your fixtures, then compare the output of the `dist/__fixtures__/` directory to what you expected.
<FileTree>
- my-project/demo/src/pages/\_\_fixtures\_\_/
- test-name-01.astro
- test-name-02.astro
- test-name-03.astro
</FileTree>
</Steps>

<FileTree>
- my-project/demo/src/pages/\_\_fixtures\_\_/
- test-name-01.astro
- test-name-02.astro
- test-name-03.astro
</FileTree>

## Publishing your component

Expand Down
Loading