hypnagaga/docs/assets/quickstart.stories-bdff7b84.js
2024-06-14 13:56:22 +00:00

24 lines
3.1 KiB
JavaScript

import{M as i}from"./chunk-S4VUQJ4A-4826f63f.js";import{p as s,j as e}from"./jsx-runtime-15b70650.js";import{u as a}from"./index-aa4d377a.js";import"./iframe-304f6ed7.js";import"../sb-preview/runtime.js";import"./index-0442a6ed.js";import"./_commonjsHelpers-de833af9.js";import"./index-d37d4223.js";import"./index-e04ae519.js";import"./index-356e4a49.js";function o(t){const r=Object.assign({p:"p",img:"img",h1:"h1",a:"a",h2:"h2",h3:"h3",pre:"pre",code:"code"},a(),t.components);return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Contributing/Quickstart",parameters:{...s}}),`
`,e.jsx(r.p,{children:e.jsx(r.img,{src:"https://graphics.thomsonreuters.com/style-assets/images/logos/reuters-graphics-logo/svg/graphics-logo-color-dark.svg",alt:""})}),`
`,e.jsx(r.h1,{id:"contributing",children:"Contributing"}),`
`,e.jsx(r.p,{children:"Reuters Graphics team members can contribute new components, and we welcome pull requests for any of our existing components from the community."}),`
`,e.jsxs(r.p,{children:["Components are documented (and tested) using ",e.jsx(r.a,{href:"https://storybook.js.org",target:"_blank",rel:"nofollow noopener noreferrer",children:"Storybook"}),"."]}),`
`,e.jsx(r.h2,{id:"adding-a-new-chart-component",children:"Adding a new chart component"}),`
`,e.jsx(r.h3,{id:"prereqs",children:"Prereqs"}),`
`,e.jsxs(r.p,{children:["Before you start, it's probably a good idea to read up a bit on ",e.jsx(r.a,{href:"https://storybook.js.org/docs/svelte/get-started/introduction",target:"_blank",rel:"nofollow noopener noreferrer",children:"Storybook"}),", the framework used to document components."]}),`
`,e.jsx(r.h3,{id:"quickstart",children:"Quickstart"}),`
`,e.jsx(r.p,{children:"Make a new git branch for your new component, like..."}),`
`,e.jsx(r.pre,{children:e.jsx(r.code,{children:`git checkout -b my-component
`})}),`
`,e.jsx(r.p,{children:"This library includes a basic template for creating and documenting your component with Storybook you can use to get started."}),`
`,e.jsx(r.p,{children:"Just run..."}),`
`,e.jsx(r.pre,{children:e.jsx(r.code,{children:`yarn new
`})}),`
`,e.jsx(r.p,{children:"... which will create a new directory for your component and copy over an example Svelte component and story page."}),`
`,e.jsx(r.p,{children:"To start developing your component, start the dev server with..."}),`
`,e.jsx(r.pre,{children:e.jsx(r.code,{children:`yarn start
`})}),`
`,e.jsx(r.p,{children:"When you're ready to share your chart, commit your branch to GitHub, make a PR and we'll get it published!"}),`
`,e.jsx(r.pre,{children:e.jsx(r.code,{children:`git push origin my-chart
`})})]})}function c(t={}){const{wrapper:r}=Object.assign({},a(),t.components);return r?e.jsx(r,{...t,children:e.jsx(o,{...t})}):o(t)}const p=()=>{throw new Error("Docs-only story")};p.parameters={docsOnly:!0};const n={title:"Contributing/Quickstart",parameters:{...s},tags:["stories-mdx"],includeStories:["__page"]};n.parameters=n.parameters||{};n.parameters.docs={...n.parameters.docs||{},page:c};const f=["__page"];export{f as __namedExportsOrder,p as __page,n as default};
//# sourceMappingURL=quickstart.stories-bdff7b84.js.map