-
Notifications
You must be signed in to change notification settings - Fork 2
Building & Testing
Aarav Malani edited this page Jun 6, 2026
·
2 revisions
This repository has been tested on Node.js v22+ and Yarn v4.12.0.
To build and test the plugins, run the following commands in the root directory of the repository
# Install dependencies
yarn
# Build the plugins
yarn build
# Run tests
yarn testTo build a single installable plugin, navigate to the directory (src/pluginType/pluginName) and run the build there
# Change directory
cd path/to/plugin
# Build the plugin
yarn build
# OR yarn build --watch to put it into build modeNote: this will not update the dist/ directory for external plugins, though the artifacts can be copied manually
The local deployment of plugins depend on whether the plugin is external or installable
The general way to host a built external plugin is to set up an HTTP server which hosts the dist/ folder.
# Serves the `dist/` folder to port 3000
yarn dlx serve dist/ --corsThis section assumes you have a consumer of the installable plugin's package (aka, the @sourceacademy/type-name is part of the dependencies of the project).
# Navigate to the project
cd path/to/consumer
# Link the project to the repository's copy
yarn link path/to/plugins/src/type/name