profectus-docs/guide/setup.html

26 lines
No EOL
17 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Setting Up | Profectus</title>
<meta name="description" content="A game engine that grows with you.">
<link rel="stylesheet" href="/assets/style.c74ed65d.css">
<link rel="modulepreload" href="/assets/app.1f0d41ed.js">
<link rel="modulepreload" href="/assets/guide_setup.md.6fd69476.lean.js">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="twitter:title" content="Setting Up | Profectus">
<meta property="og:title" content="Setting Up | Profectus">
</head>
<body>
<div id="app"><!--[--><div class="theme"><header class="nav-bar" data-v-40587210><div class="sidebar-button" data-v-40587210><svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z" class></path></svg></div><a class="nav-bar-title" href="/" aria-label="Profectus, back to home" data-v-40587210 data-v-016a8bd8><!----> Profectus</a><div class="flex-grow" data-v-40587210></div><div class="nav" data-v-40587210><nav class="nav-links" data-v-40587210 data-v-35b91e7e><!--[--><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item active" href="/guide/" data-v-49fe041d>Guide <!----></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item" href="/api/" data-v-49fe041d>API <!----></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://forums.moddingtree.com" target="_blank" rel="noopener noreferrer" data-v-49fe041d>Forums <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://discord.gg/F3xveHV" target="_blank" rel="noopener noreferrer" data-v-49fe041d>Discord <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://github.com/profectus-engine/Profectus" target="_blank" rel="noopener noreferrer" data-v-49fe041d>Github <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><!--]--><!----><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://github.com/profectus-engine/profectus-docs" target="_blank" rel="noopener noreferrer" data-v-49fe041d>GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav></div><!--[--><!--]--></header><aside class="sidebar" data-v-17c48e2f><nav class="nav-links nav" data-v-17c48e2f data-v-35b91e7e><!--[--><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item active" href="/guide/" data-v-49fe041d>Guide <!----></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item" href="/api/" data-v-49fe041d>API <!----></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://forums.moddingtree.com" target="_blank" rel="noopener noreferrer" data-v-49fe041d>Forums <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://discord.gg/F3xveHV" target="_blank" rel="noopener noreferrer" data-v-49fe041d>Discord <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://github.com/profectus-engine/Profectus" target="_blank" rel="noopener noreferrer" data-v-49fe041d>Github <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><!--]--><!----><div class="item" data-v-35b91e7e><div class="nav-link" data-v-35b91e7e data-v-49fe041d><a class="item isExternal" href="https://github.com/profectus-engine/profectus-docs" target="_blank" rel="noopener noreferrer" data-v-49fe041d>GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-49fe041d><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav><!--[--><!--]--><ul class="sidebar-links" data-v-17c48e2f><!--[--><li class="sidebar-link"><p class="sidebar-link-item">Getting Started</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/">Introduction</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item active" href="/guide/setup">Setting Up</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#local-development">Local Development</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#deploying">Deploying</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="#replit">Replit</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#glitch">Glitch</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/updating">Updating Profectus</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Creating Your Project</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/project-info">Project Info</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/project-entry">Project Entry</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/layers">Layers</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/changelog">Changelog</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/guide/themes">Themes</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Creating Features</p><!----></li><!--]--></ul><!--[--><!--]--></aside><div class="sidebar-mask"></div><main class="page" data-v-8fcebc32><div class="container" data-v-8fcebc32><!--[--><!--]--><div style="position:relative;" class="content" data-v-8fcebc32><div><h1 id="setting-up" tabindex="-1">Setting Up <a class="header-anchor" href="#setting-up" aria-hidden="true">#</a></h1><p>Profectus requires a node development environment in order to work on a project. If you are comfortable with the command line, it is recommended to use a local development environment.</p><h2 id="local-development" tabindex="-1">Local Development <a class="header-anchor" href="#local-development" aria-hidden="true">#</a></h2><p>You will require the following tools for local development:</p><ul><li><a href="https://git-scm.com/downloads" target="_blank" rel="noopener noreferrer">git</a></li><li><a href="https://nodejs.org/en/download/" target="_blank" rel="noopener noreferrer">node</a></li></ul><p>Create a new project from the <a href="https://github.com/profectus-engine/Profectus" target="_blank" rel="noopener noreferrer">Profectus repository</a> via the &quot;Use this template&quot; button. You can then copy the link for the repository to clone it locally.</p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>Since the repository is a template repository, you can easily create multiple projects from one repository. However, it does make updating an existing project to a newer version of Profectus more difficult.</p></div><p>It&#39;s recommended to create a new git branch for development, so you can push your changes without it affecting the live build. This allows you to continue working with smaller commits, and only release new versions when you&#39;re actually ready to. The github workflow will automatically rebuild the page whenever you push to the <code>main</code> branch.</p><p>The next step is to install Profectus&#39; dependencies. This is as simple as running <code>npm install</code>.</p><p>You can now run <code>npm serve</code> to start a local server that will host your project so you can work on it. As you change files the site will automatically reload them.</p><h3 id="deploying" tabindex="-1">Deploying <a class="header-anchor" href="#deploying" aria-hidden="true">#</a></h3><p>If you&#39;re using git, deploying is as easy as pushing your changes to the <code>main</code> branch. In a couple minutes the site will be updated fully automatically. If you&#39;d like to see progress on it, or look at any errors that happened, you can do so from the actions tab on your repository.</p><p><img src="/assets/actionsbutton.f1ba9d8e.png" alt=""></p><p>Before github knows to actually host the generated site, you&#39;ll have to enable github pages in the repo settings. This just means selecting the branch to use - <code>gh-pages</code>. You will only need to perform this step once. This will automatically start another github action to deploy the website.</p><p><img src="/assets/gh-pages.a24cefcf.png" alt=""></p><p>Once the action completes, your project should be available at <code>https://&lt;YOUR_GITHUB_USERNAME&gt;.github.io/&lt;YOUR_REPO_NAME&gt;/</code>. For example, the TMT Demo project hosted at <a href="https://github.com/profectus-engine/TMT-Demo" target="_blank" rel="noopener noreferrer">https://github.com/profectus-engine/TMT-Demo</a> is available at <a href="https://profectus-engine.github.io/TMT-Demo/" target="_blank" rel="noopener noreferrer">https://profectus-engine.github.io/TMT-Demo/</a>.</p><h2 id="replit" tabindex="-1">Replit <a class="header-anchor" href="#replit" aria-hidden="true">#</a></h2><p>As an alternative to local development, you may use <a href="https://replit.com" target="_blank" rel="noopener noreferrer">replit</a>, which will automatically set up your development environment for you and also host your project itself.</p><p>However, on the free plan you will be limited by the amount of resources you can use, and the program will need to start up occasionally.</p><p>To create a Profectus project on replit, all you have to do is click this button:</p><p><a href="https://repl.it/github/profectus-engine/Profectus" target="_blank" rel="noopener noreferrer"><img src="https://repl.it/badge/github/profectus-engine/Profectus" alt=""></a></p><p>You can then start the developing by clicking the &quot;Run&quot; button at the top of the screen. This will also make the project run publicly, so you could consider it as automatically deployed. This does mean you cannot have a separate development environment from your production environment, however.</p><h2 id="glitch" tabindex="-1">Glitch <a class="header-anchor" href="#glitch" aria-hidden="true">#</a></h2><p><a href="https://glitch.com" target="_blank" rel="noopener noreferrer">Glitch</a> is a site similar to replit, with much the same pros and cons. To create a projectus project on glitch, select &quot;New Project&quot;, &quot;Import from GitHub&quot;, and then type in <code>profectus-engine/Profectus</code>. The new project will be created and should be automatically configured and ready to go.</p></div></div><footer class="page-footer" data-v-8fcebc32 data-v-b65b4b36><div class="edit" data-v-b65b4b36><div class="edit-link" data-v-b65b4b36 data-v-55695e90><a class="link" href="https://github.com/profectus-engine/profectus-docs/edit/main/guide/setup.md" target="_blank" rel="noopener noreferrer" data-v-55695e90>Edit this page on GitHub <svg class="icon outbound icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-55695e90><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="updated" data-v-b65b4b36><!----></div></footer><div class="next-and-prev-link" data-v-8fcebc32 data-v-e65a9748><div class="container" data-v-e65a9748><div class="prev" data-v-e65a9748><a class="link" href="/guide/" data-v-e65a9748><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-prev" data-v-e65a9748><path d="M19,11H7.4l5.3-5.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-7,7c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.2-0.1,0.5,0,0.8c0.1,0.1,0.1,0.2,0.2,0.3l7,7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.4,13H19c0.6,0,1-0.4,1-1S19.6,11,19,11z"></path></svg><span class="text" data-v-e65a9748>Introduction</span></a></div><div class="next" data-v-e65a9748><a class="link" href="/guide/updating" data-v-e65a9748><span class="text" data-v-e65a9748>Updating Profectus</span><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-next" data-v-e65a9748><path d="M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"></path></svg></a></div></div></div><!--[--><!--]--></div></main></div><!----><!--]--></div>
<script>__VP_HASH_MAP__ = JSON.parse("{\"guide_changelog.md\":\"fcdbc813\",\"guide_index.md\":\"5e3b8868\",\"guide_layers.md\":\"9b9b2d84\",\"guide_project-entry.md\":\"346c63e7\",\"guide_project-info.md\":\"12d9a8f2\",\"guide_setup.md\":\"6fd69476\",\"guide_themes.md\":\"f41015ce\",\"guide_updating.md\":\"812c69a7\",\"index.md\":\"e75d498a\"}")</script>
<script type="module" async src="/assets/app.1f0d41ed.js"></script>
</body>
</html>