UNPKG

chariot.js

Version:

An extremely lightweight and extensible Eris client framework

1 lines • 6.38 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{220:function(t,e,s){"use strict";s.r(e);var a=s(0),n=Object(a.a)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._v(" "),s("p",[t._v("If you are reading this you've probably successfully installed Chariot.js and now look into how to get started with development. This page will guide you through the setup process, project structure, and hopefully will clarify some questions you may have.")]),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),s("p",[t._v("A project structure may look as simple as this")]),t._v(" "),t._m(3),s("p",[t._v("or as sophisticated as this")]),t._v(" "),t._m(4),t._m(5),t._v(" "),s("p",[t._v("As written before, Chariot.js is capable of loading command and event module files auto"),s("em",[t._v("magically")]),t._v(" without providing any sort of file path. This development convenience requires the developer to extend their command and event module classes with the corresponding base classes. "),s("strong",[t._v("Commands")]),t._v(" need to extend the "),s("router-link",{attrs:{to:"./classes/command.html"}},[t._v("Command")]),t._v(" class, "),s("strong",[t._v("Event Modules")]),t._v(" need to extend the "),s("router-link",{attrs:{to:"./classes/event.html"}},[t._v("Event")]),t._v(" class.")],1),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),s("p",[t._v("If a more practical example of a working bot is desired, checking out the fully featured "),s("router-link",{attrs:{to:"./examples/project.html"}},[t._v("project example")]),t._v(" might be worth a shot. Other than that, there's many "),s("router-link",{attrs:{to:"./examples/command.html"}},[t._v("command")]),t._v(" and "),s("router-link",{attrs:{to:"./examples/event.html"}},[t._v("event module")]),t._v(" examples waiting in the examples category to be discovered.")],1)])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",{attrs:{id:"getting-started"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[this._v("#")]),this._v(" Getting Started")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"šŸ“‚-project-structure"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#šŸ“‚-project-structure"}},[this._v("#")]),this._v(" šŸ“‚ Project Structure")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("As Chariot.js strives to be as unopinionated as possible, a project may be structured however it's necessary. More abstractions? Less abstractions? Folders separating different files? However "),e("strong",[this._v("you like")]),this._v(". Chariot.js is built in a way it'll auto"),e("em",[this._v("magically")]),this._v(" find everything you've provided no matter how your project is structured. Whether you have all your files in the same directory, or like to nest different files for different categories within multiple nested folders, Chariot.js will properly find and register everything without even needing to provide a file path! "),e("strong",[this._v("You")]),this._v(" dictate in which direction it's going and Chariot.js will adapt!")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("Project"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\nā”œā”€ā”€ index"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\nā”œā”€ā”€ Ping"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n└── Ready"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("Project"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\nā”œā”€ā”€ commands"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ ā”œā”€ā”€ admin"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ │ └── Eval"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│ └── games"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ ā”œā”€ā”€ gambling"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ │ ā”œā”€ā”€ Roulette"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│ │ └── SlotMachine"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│ └── cards"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ └── Uno"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│\nā”œā”€ā”€ events"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ ā”œā”€ā”€ ready"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ │ └── ReadyCheck"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│ └── guildCreate"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("/")]),t._v("\n│ ā”œā”€ā”€ RegisterGuild"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│ └── CheckIfBlacklisted"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n│\n└── index"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("js\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"šŸ’æ-loading-commands-events"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#šŸ’æ-loading-commands-events"}},[this._v("#")]),this._v(" šŸ’æ Loading Commands & Events")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("strong",[this._v("That's it!")]),this._v(" Chariot.js will handle the rest and register any commands and event modules auto"),e("em",[this._v("magically")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"ā”-what-s-next"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ā”-what-s-next"}},[this._v("#")]),this._v(" ā” What's Next?")])}],!1,null,null,null);e.default=n.exports}}]);