-
Notifications
You must be signed in to change notification settings - Fork 29
Repository Structure
Lee Yi edited this page Nov 21, 2022
·
4 revisions
This page serves to contain up-to-date information on this repository's file structure.
.
├── .github # Github related files (Pull request & issue templates and workflows)
├── .husky # Husky related files for managing git hooks
├── build # Automatically generated files after transpilation of src directory
├── lib (deprecated) # Old module bundle files (DEPRECATED)
├── scripts # Contains the API documentation generator and module command line app
├── docs # Source API documentation generator files
├── templates # Source Modules system command line application files
├── src # Source code for Source modules
├── bundles # Module bundle's files
├── tabs # Module tab's files
├── typings # Types for the Source Modules system global variables (eg. __params)
├── .eslintrc.js # ESLint code linter settings
├── .gitignore # Contains files to be ignored by Git version control system
├── .prettierrc.json # Prettier code formatter settings
├── LICENSE
├── README.md
├── babel.config.js # Babel transpiler settings
├── modules.json # Contains metadata regarding Source modules
├── package.json # Project settings
├── rollup.config.js # Rollup code bundler settings
├── tsconfig.json # TypeScript configuration settings
└── yarn.lock # Data related to project dependencies
The root directory contains a few main folders and files elaborated on in the table below:
Name | Description |
---|---|
build |
These files are the output of executing the build script which transpiles the files in the src directory and modules.json . The result is the files in the build directory which is intended to be served in its entirety in the Source Modules static server for Source Academy users to consume as Source Modules and a Source Module API documentation page. |
src |
In this folder lies the two main subdirectories bundles and tabs . Each Source Module Bundle will have a folder of the same name inside the bundle subdirectory which will house the implementation of the Source Module's provided Source functions. Each Source Module Tab will also have a folder inside the tabs subdirectory which will house the implementation of the Source Module Tab's user interface to be rendered as part of the Source Academy side content tabs. Note: Within each of the Source Module Bundle/Tab root folders within the src directory, the folder and file structure is left to the discretion of the Source Module authors. |
modules.json |
The modules.json file contains all the data related to the relationship between the Source Module, its bundle and the tabs that it contains. Currently, each Source Module is stored as a key in the modules.json object that contains the property tabs which is an array of the Source Module's tab names that it includes. |
Below is an example of the src
directory with the pix_n_flix
Source Module.
src # Source code for Source Modules
├── bundles # Source Module bundle's files
├── pix_n_flix # Source Module pix_n_flix bundle's root directory
├── index.ts # Source Module pix_n_flix bundle's entry point
├── tabs # Source Module tab's files
├── Pixnflix # Source Module pix_n_flix tab PixNFlix's root directory
├── index.tsx # Source Module pix_n_flix tab PixNFlix's entry point
Below is an example of modules.json
with the pix_n_flix
Source Module.
{
"pix_n_flix": {
"tabs": [ "Pixnflix" ]
}
}
- 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.