1"use strict";(self.webpackChunkframeright_docs=self.webpackChunkframeright_docs||[]).push([[4],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>d});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),c=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=c(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},g=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=c(n),g=r,d=u["".concat(p,".").concat(g)]||u[g]||m[g]||i;return n?a.createElement(d,o(o({ref:t},s),{},{components:n})):a.createElement(d,o({ref:t},s))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[u]="string"==typeof e?e:r,o[1]=l;for(var c=2;c<i;c++)o[c]=n[c];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}g.displayName="MDXCreateElement"},2235:(e,t,n)=>{n.d(t,{P:()=>i});var a=n(7294),r=n(9960);function i(e){let{href:t}=e;return a.createElement(r.Z,{className:"github-corner-icon",href:t},a.createElement("img",{src:"/img/thirdparty/github-mark.svg",alt:"GitHub repository"}))}},99:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>g,frontMatter:()=>o,metadata:()=>p,toc:()=>s});var a=n(7462),r=(n(7294),n(3905)),i=n(2235);const o={sidebar_position:10,tags:["howto"]},l="Contributing",p={unversionedId:"javascript/contributing",id:"javascript/contributing",title:"Contributing",description:"If you haven't already, check out the source code before proceeding:",source:"@site/docs/javascript/contributing.md",sourceDirName:"javascript",slug:"/javascript/contributing",permalink:"/javascript/contributing",draft:!1,editUrl:"https://github.com/frameright/docs.frameright.io/tree/main/docs/javascript/contributing.md",tags:[{label:"howto",permalink:"/tags/howto"}],version:"current",sidebarPosition:10,frontMatter:{sidebar_position:10,tags:["howto"]},sidebar:"documentationSidebar",previous:{title:"JavaScript Library",permalink:"/javascript/"},next:{title:"Changelog",permalink:"/javascript/changelog"}},c={},s=[{value:"Code formatting",id:"code-formatting",level:2},{value:"Validating",id:"validating",level:2},{value:"Running the unit tests",id:"running-the-unit-tests",level:3},{value:"Documenting",id:"documenting",level:2},{value:"(Re-)generating the TypeDoc reference documentation",id:"re-generating-the-typedoc-reference-documentation",level:3},{value:"(Re-)generating tables of contents",id:"re-generating-tables-of-contents",level:3},{value:"Releasing",id:"releasing",level:2},{value:"Version number",id:"version-number",level:3},{value:"Changelog",id:"changelog",level:3},{value:"Update <code>package-lock.json</code>",id:"update-package-lockjson",level:3},{value:"Last tweaks and checks",id:"last-tweaks-and-checks",level:3},{value:"Git tag",id:"git-tag",level:3},{value:"Build the package locally",id:"build-the-package-locally",level:3},{value:"Publish the package to npm",id:"publish-the-package-to-n
1pm",level:3}],u={toc:s},m="wrapper";function g(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"contributing"},"Contributing"),(0,r.kt)(i.P,{href:"https://github.com/Frameright/image-display-control-metadata-parser",mdxType:"GitHubCornerIcon"}),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"If you haven't already, check out the source code before proceeding:"),(0,r.kt)("pre",{parentName:"admonition"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"git clone https://github.com/Frameright/image-display-control-metadata-parser\ncd image-display-control-metadata-parser/\n"))),(0,r.kt)("h2",{id:"code-formatting"},"Code formatting"),(0,r.kt)("p",null,"Pull and run ",(0,r.kt)("a",{parentName:"p",href:"https://eslint.org/"},"ESLint")," and\n",(0,r.kt)("a",{parentName:"p",href:"https://github.com/prettier/prettier"},"prettier")," with:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm install\nnpm run lint # check for errors\nnpm run format # fix errors\n")),(0,r.kt)("h2",{id:"validating"},"Validating"),(0,r.kt)("h3",{id:"running-the-unit-tests"},"Running the unit tests"),(0,r.kt)("p",null,"Pull and run ",(0,r.kt)("a",{parentName:"p",href:"https://jestjs.io/"},"Jest")," with:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm install\nnpm run test\n")),(0,r.kt)("h2",{id:"documenting"},"Documenting"),(0,r.kt)("h3",{id:"re-generating-the-typedoc-reference-documentation"},"(Re-)generating the TypeDoc reference documentation"),(0,r.kt)("p",null,"Pull and run ",(0,r.kt)("a",{parentName:"p",href:"https://typedoc.org/"},"TypeDoc")," with:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm install\nnpm run gendoc\n")),(0,r.kt)("h3",{id:"re-generating-tables-of-contents"},"(Re-)generating tables of contents"),(0,r.kt)("p",null,"Pull and run ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/jonschlinkert/markdown-toc"},(0,r.kt)("inlineCode",{parentName:"a"},"markdown-toc")),"\nwith:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm install\nnpm run gentoc\n")),(0,r.kt)("h2",{id:"releasing"},"Releasing"),(0,r.kt)("h3",{id:"version-number"},"Version number"),(0,r.kt)("p",null,"Choose the next version number according to the rules of\n",(0,r.kt)("a",{parentName:"p",href:"https://semver.org/"},"Semantic Versioning")," and set it in ",(0,r.kt)("inlineCode",{parentName:"p"},"package.json"),"."),(0,r.kt)("p",null,"Also update the examples to use the new version number:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"in ",(0,r.kt)("a",{parentName:"li",href:"/javascript/"},"this documentation"),","),(0,r.kt)("li",{parentName:"ul"},"on ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/Frameright/image-display-control-metadata-parser"},"GitHub"),".")),(0,r.kt)("h3",{id:"changelog"},"Changelog"),(0,r.kt)("p",null,"Describe the changes made compared to the last released version in the\n",(0,r.kt)("a",{parentName:"p",href:"/javascript/changelog"},"changelog"),". Browse the git history to make sure nothing has been\nleft out."),(0,r.kt)("h3",{id:"update-package-lockjson"},"Update ",(0,r.kt)("inlineCode",{parentName:"h3"},"package-lock.json")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"rm -rf node_modules/ package-lock.json\nnpm install\n")),(0,r.kt)("h3",{id:"last-tweaks-and-checks"},"Last tweaks and checks"),(0,r.kt)("p",null,"Format and validate the source one last time:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm run format\nnpm run gendoc\nnpm run gentoc\nnpm run lint\nnpm run test\n")),(0,r.kt)("p",null,"Commit and push any local changes:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},'git add -A\ngit commit -m "<my message>"\ngit push\n')),(0,r.kt)("h3",{id:"git-tag"},"Git tag"),(0,r.kt)("p",null,"In the rest of this document we'll assume you are releasing version ",(0,r.kt)("inlineCode",{parentName:"p"},"1.2.3"),".\nCreate a git tag for the version you are releasing by running:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"git tag 1.2.3\ngit push --tags\n")),(0,r.kt)("h3",{id:"build-the-package-locally"},"Build the package locally"),(0,r.kt)("p",null,"Build the package locally by running:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm pack\n")),(0,r.kt)("p",null,"And check that the resulting\n",(0,r.kt)("inlineCode",{parentName:"p"},"frameright-image-display-control-metadata-parser-1.2.3.tgz")," looks well-formed.\nFinally clean up by running:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"rm frameright-image-display-control-metadata-parser-1.2.3.tgz\n")),(0,r.kt)("h3",{id:"publish-the-package-to-n
1pm"},"Publish the package to npm"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"npm login --scope=@frameright\nnpm publish\n")),(0,r.kt)("admonition",{type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"On the first publication do ",(0,r.kt)("inlineCode",{parentName:"p"},"npm publish --access public")," instead.")),(0,r.kt)("p",null,"And check that the package looks well-formed at\n",(0,r.kt)("inlineCode",{parentName:"p"},"https://www.npmjs.com/package/@frameright/image-display-control-metadata-parser/v/1.2.3"),"."))}g.isMDXComponent=!0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.