hypnagaga/docs/assets/quickstart-osCMBt_P.js
hobbes7878 3dbfb30c48 docs
2024-08-28 10:56:21 +01:00

23 lines
2.6 KiB
JavaScript

import{j as e,p as s}from"./docsPage-CrCNk6vV.js";import{useMDXComponents as t}from"./index-CswL0fy2.js";import{M as i}from"./index-CluuxvkZ.js";import"./index-DwChlhAQ.js";import"./_commonjsHelpers-BosuxZz1.js";import"./index-D-8MO0q_.js";import"./iframe-SAeDpW7h.js";import"../sb-preview/runtime.js";import"./index-DxKRhftL.js";import"./index-DrFu-skq.js";function o(r){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Contributing/Quickstart",parameters:{...s}}),`
`,e.jsx(n.p,{children:e.jsx(n.img,{src:"https://graphics.thomsonreuters.com/style-assets/images/logos/reuters-graphics-logo/svg/graphics-logo-color-dark.svg",alt:""})}),`
`,e.jsx(n.h1,{id:"contributing",children:"Contributing"}),`
`,e.jsx(n.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(n.p,{children:["Components are documented (and tested) using ",e.jsx(n.a,{href:"https://storybook.js.org",rel:"nofollow",children:"Storybook"}),"."]}),`
`,e.jsx(n.h2,{id:"adding-a-new-chart-component",children:"Adding a new chart component"}),`
`,e.jsx(n.h3,{id:"prereqs",children:"Prereqs"}),`
`,e.jsxs(n.p,{children:["Before you start, it's probably a good idea to read up a bit on ",e.jsx(n.a,{href:"https://storybook.js.org/docs/svelte/get-started/introduction",rel:"nofollow",children:"Storybook"}),", the framework used to document components."]}),`
`,e.jsx(n.h3,{id:"quickstart",children:"Quickstart"}),`
`,e.jsx(n.p,{children:"Make a new git branch for your new component, like..."}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{children:`git checkout -b my-component
`})}),`
`,e.jsx(n.p,{children:"This library includes a basic template for creating and documenting your component with Storybook you can use to get started."}),`
`,e.jsx(n.p,{children:"Just run..."}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{children:`yarn new
`})}),`
`,e.jsx(n.p,{children:"... which will create a new directory for your component and copy over an example Svelte component and story page."}),`
`,e.jsx(n.p,{children:"To start developing your component, start the dev server with..."}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{children:`yarn start
`})}),`
`,e.jsx(n.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(n.pre,{children:e.jsx(n.code,{children:`git push origin my-chart
`})})]})}function j(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(o,{...r})}):o(r)}export{j as default};