Skip to content

Exporting Course Source Code

geonatalie edited this page Aug 20, 2019 · 7 revisions

You can export the source code for any course you have developed in the authoring tool for standalone development using the Adapt framework's build tools. This is ideal if you want to test out plug-ins that aren't yet available for the authoring tool, or if you're developing your own plug-ins and want a more streamlined build process.

Prerequisites

Ensure that you have all the necessary prerequisites for the framework installed.

Export the Course Source Code

In the authoring tool, open the course you wish to export by double-clicking it in the Dashboard. Then click the "Export source code" option in the menu bar. The exported course source code will download to your computer as a ZIP file.

Unzip the Course

Use the program of your choice to extract the files into a folder for the course.

Install Dependencies

Open a command-line interface, navigate to the folder you extracted the course files into and run:

npm install

This will install the required node modules for use by the framework's build tools.

Remove the includes array from the configuration file

The Authoring Tool adds an includes array to the build object in src/course/config.json - you need to remove this completely so that you're left with an empty build object e.g.:

"build": {}

Note: you can safely do this whilst the npm install command is running

Build and run the course

The final step is to build your standalone course, and run a local web server for viewing it. To do this, run the following commands:

grunt build
grunt server

This should open a new web page automatically. If not, point your browser to: http://localhost:9001/.

See Compiling, testing and deploying your Adapt course for more details on using Adapt's build tools.

Clone this wiki locally