mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
1 line
4.8 KiB
JavaScript
1 line
4.8 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2446],{4681:function(e,t,n){var i=n(9496);t.Z=function(e){var t={fontSize:"1.7rem",paddingRight:"left"===e.side&&"0.6rem",paddingLeft:"right"===e.side&&"0.6rem",verticalAlign:"center",display:"flex"};return i.createElement("div",{style:Object.assign({width:"fit-content",height:"3rem",padding:"0.8rem",borderRadius:"0.2rem",verticalAlign:"baseline",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:"white"},e.style),className:"icon-button"},"left"===e.side&&i.createElement("div",{style:t},e.icon),i.createElement("div",null,e.children),"right"===e.side&&i.createElement("div",{style:t},e.icon))}},4798:function(e,t,n){n.r(t),n.d(t,{assets:function(){return c},contentTitle:function(){return u},default:function(){return p},frontMatter:function(){return d},metadata:function(){return m},toc:function(){return v}});var i=n(5443),o=n(3010),a=(n(9496),n(9613)),r=n(4681),l=n(999),s=["components"],d={title:"Building inventory UI"},u=void 0,m={unversionedId:"ox_inventory/Guides/inventory_ui",id:"ox_inventory/Guides/inventory_ui",title:"Building inventory UI",description:"Requirements to build:",source:"@site/docs/ox_inventory/Guides/inventory_ui.md",sourceDirName:"ox_inventory/Guides",slug:"/ox_inventory/Guides/inventory_ui",permalink:"/docs/ox_inventory/Guides/inventory_ui",draft:!1,editUrl:"https://github.com/overextended/overextended.github.io/tree/main/docs/ox_inventory/Guides/inventory_ui.md",tags:[],version:"current",frontMatter:{title:"Building inventory UI"},sidebar:"docs",previous:{title:"Creating items",permalink:"/docs/ox_inventory/Guides/creatingItems"},next:{title:"Creating custom stashes",permalink:"/docs/ox_inventory/Guides/stashes"}},c={},v=[{value:"Requirements to build:",id:"requirements-to-build",level:2},{value:"Installing Node.js:",id:"installing-nodejs",level:2},{value:"Installing Yarn:",id:"installing-yarn",level:2},{value:"Building the UI:",id:"building-the-ui",level:2}],h={toc:v};function p(e){var t=e.components,n=(0,o.Z)(e,s);return(0,a.kt)("wrapper",(0,i.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"requirements-to-build"},"Requirements to build:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Node.js"),(0,a.kt)("li",{parentName:"ul"},"Yarn")),(0,a.kt)("h2",{id:"installing-nodejs"},"Installing Node.js:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Download the LTS version of Node.js."),(0,a.kt)("li",{parentName:"ul"},"Go through the install and make sure you install all of the features."),(0,a.kt)("li",{parentName:"ul"},"Run ",(0,a.kt)("inlineCode",{parentName:"li"},"node --version")," in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly.")),(0,a.kt)("div",{style:{width:"fit-content"}},(0,a.kt)("a",{href:"https://www.nodejs.org"},(0,a.kt)(r.Z,{side:"left",icon:(0,a.kt)(l.jPo,{mdxType:"FaNodeJs"}),mdxType:"IconButton"},"Download"))),(0,a.kt)("h2",{id:"installing-yarn"},"Installing Yarn:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Now that you've installed Node.js you can install Yarn by running ",(0,a.kt)("inlineCode",{parentName:"li"},"npm install --global yarn")," in cmd.")),(0,a.kt)("h2",{id:"building-the-ui"},"Building the UI:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"cd into the web directory of ox_inventory"),(0,a.kt)("li",{parentName:"ul"},"In your cmd type ",(0,a.kt)("inlineCode",{parentName:"li"},"yarn")," and in will start downloading the node modules."),(0,a.kt)("li",{parentName:"ul"},"After it's done downloading node modules you can run ",(0,a.kt)("inlineCode",{parentName:"li"},"yarn build")," to build the UI.")),(0,a.kt)("div",{className:"admonition admonition-info alert alert--info"},(0,a.kt)("div",{parentName:"div",className:"admonition-heading"},(0,a.kt)("h5",{parentName:"div"},(0,a.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,a.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,a.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"Hot reloads")),(0,a.kt)("div",{parentName:"div",className:"admonition-content"},(0,a.kt)("p",{parentName:"div"},"When working in the browser you can run ",(0,a.kt)("inlineCode",{parentName:"p"},"yarn start"),", which supports hot reloads meaning that\nyou will see your changes after saving your file."),(0,a.kt)("p",{parentName:"div"},"If you want to work in game you can run ",(0,a.kt)("inlineCode",{parentName:"p"},"yarn start:game")," which writes changes to disk, so\nthe only thing you have to do is restart the resource for it take affect."))))}p.isMDXComponent=!0}}]); |