-
Notifications
You must be signed in to change notification settings - Fork 32
Modules Structure
Marcus edited this page Feb 14, 2021
·
3 revisions
The latest modules system follows the following structure:
(_params) => {
return {
// For functions that source academy cadets will be interacting with in the IDE.
functions: {
function1: () => [],
function2: (arg1, arg2) => [...arg1, ...arg2],
},
// For generating the side content tabs on cadet-frontend.
sideContents: [
{
// Renders component if function returns true
toSpawn: (context) => true,
// Module component that will be rendered in the tab
body: (React) => (props) => {
return (
<div>
<h1>Hello World!</h1>
</div>
);
},
// Tooltip string
label: "Test Component",
// Icon for side content tab (uses BlueprintJS icon mame)
iconName: "mugshot",
},
],
};
};
- Home
- Overview
- System Implementation
-
Development Guide
- Getting Started
- Repository Structure
-
Creating a New Module
- Creating a Bundle
- Creating a Tab
- Writing Documentation
- Developer Documentation (TODO)
- Build System
- Source Modules
- FAQs
Try out Source Academy here.
Check out the Source Modules generated API documentation here.