From a1abe5201c1c047d048b9a26ba2e11cc8de1ac89 Mon Sep 17 00:00:00 2001 From: Eduardo Pereira Date: Tue, 30 Apr 2024 22:00:19 -0300 Subject: [PATCH 1/2] Add Steps component to `publish-to-npm.mdx` --- src/content/docs/en/reference/publish-to-npm.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/content/docs/en/reference/publish-to-npm.mdx b/src/content/docs/en/reference/publish-to-npm.mdx index 45d877209d65d..b23acf7418143 100644 --- a/src/content/docs/en/reference/publish-to-npm.mdx +++ b/src/content/docs/en/reference/publish-to-npm.mdx @@ -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/)** @@ -233,10 +234,15 @@ Astro does not currently ship a test runner. _(If you are interested in helping In the meantime, our current recommendation for testing is: + 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. + - my-project/demo/src/pages/\_\_fixtures\_\_/ From 6099eb8348ad5792a367079b32639b4661c657a6 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 2 May 2024 14:36:51 +0100 Subject: [PATCH 2/2] Move filetree within steps --- src/content/docs/en/reference/publish-to-npm.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/en/reference/publish-to-npm.mdx b/src/content/docs/en/reference/publish-to-npm.mdx index b23acf7418143..1da709523cfae 100644 --- a/src/content/docs/en/reference/publish-to-npm.mdx +++ b/src/content/docs/en/reference/publish-to-npm.mdx @@ -242,14 +242,14 @@ In the meantime, our current recommendation for testing is: 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. + + - my-project/demo/src/pages/\_\_fixtures\_\_/ + - test-name-01.astro + - test-name-02.astro + - test-name-03.astro + - -- my-project/demo/src/pages/\_\_fixtures\_\_/ - - test-name-01.astro - - test-name-02.astro - - test-name-03.astro - ## Publishing your component