diff options
author | 2021-07-15 18:14:46 +0000 | |
---|---|---|
committer | 2021-07-15 18:14:46 +0000 | |
commit | f51f6c85d124226dbf35205f0550862a47ed3d5f (patch) | |
tree | 3dcdaf3019cc20362d41ae7bd791424f6e651288 /docs/src/pages/guides/publish-to-npm.md | |
parent | 166e22bdf35b9751dc42f5cc6cb27a99b077df93 (diff) | |
download | astro-f51f6c85d124226dbf35205f0550862a47ed3d5f.tar.gz astro-f51f6c85d124226dbf35205f0550862a47ed3d5f.tar.zst astro-f51f6c85d124226dbf35205f0550862a47ed3d5f.zip |
[ci] yarn format
Diffstat (limited to 'docs/src/pages/guides/publish-to-npm.md')
-rw-r--r-- | docs/src/pages/guides/publish-to-npm.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/src/pages/guides/publish-to-npm.md b/docs/src/pages/guides/publish-to-npm.md index aebf0311a..86e5400f7 100644 --- a/docs/src/pages/guides/publish-to-npm.md +++ b/docs/src/pages/guides/publish-to-npm.md @@ -3,9 +3,9 @@ layout: ~/layouts/Main.astro title: Publish a Component to NPM --- -Built a great Astro component? **Publish it to [npm!](https://npmjs.com/)** +Built a great Astro component? **Publish it to [npm!](https://npmjs.com/)** -Once published to npm, Astro components can be installed and used in your project like any other npm package. npm is a great way to share Astro components across projects within your team, your company, or the entire world. +Once published to npm, Astro components can be installed and used in your project like any other npm package. npm is a great way to share Astro components across projects within your team, your company, or the entire world. ## Basic NPM Package Setup @@ -66,7 +66,7 @@ import Capitalize from '@example/my-components/Capitalize.astro'; <Capitalize phrase={`Hello world`} /> ``` -This is a less common scenario, and we only recommend it if you have good reason. Because Astro is completely rendered at build-time, there are no client-side performance concerns to our default recommendation to export your components from a single `index.js` file. +This is a less common scenario, and we only recommend it if you have good reason. Because Astro is completely rendered at build-time, there are no client-side performance concerns to our default recommendation to export your components from a single `index.js` file. To support importing by file within your package, add each file to your **package.json** `exports` map: @@ -80,4 +80,4 @@ To support importing by file within your package, add each file to your **packag + "./Capitalize.astro": "./Capitalize.astro" } } -```
\ No newline at end of file +``` |