hypnagaga/docs/assets/quickstart.stories-69520955.js
Jon McClure c420ce15b4 docs
2023-09-19 08:31:54 +01:00

24 lines
3.1 KiB
JavaScript

import{M as c}from"./chunk-S4VUQJ4A-333d721b.js";import{p as i,j as e}from"./jsx-runtime-c0e99e85.js";import{u as a}from"./index-d41ddae7.js";import"./iframe-8327eba7.js";import"../sb-preview/runtime.js";import"./index-5b61f687.js";import"./_commonjsHelpers-de833af9.js";import"./index-d37d4223.js";import"./index-e04ae519.js";import"./index-356e4a49.js";function p(n={}){const{wrapper:o}=Object.assign({},a(),n.components);return o?e.jsx(o,{...n,children:e.jsx(s,{})}):s();function s(){const r=Object.assign({p:"p",img:"img",h1:"h1",a:"a",h2:"h2",h3:"h3",pre:"pre",code:"code"},a(),n.components);return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Contributing/Quickstart",parameters:{...i}}),`
`,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
`})})]})}}const d=()=>{throw new Error("Docs-only story")};d.parameters={docsOnly:!0};const t={title:"Contributing/Quickstart",parameters:{...i},tags:["stories-mdx"],includeStories:["__page"]};t.parameters=t.parameters||{};t.parameters.docs={...t.parameters.docs||{},page:p};const w=["__page"];export{w as __namedExportsOrder,d as __page,t as default};
//# sourceMappingURL=quickstart.stories-69520955.js.map