-
Notifications
You must be signed in to change notification settings - Fork 248
Compiling, testing and deploying your Adapt course
Important: if using the authoring tool, please do not attempt to build individual courses using the below instructions (unless you really know what you're doing).
To make developing and deploying Adapt courses as painless as possible, we use the Grunt task runner to automate as many of the menial tasks as possible.
After navigating to the root directory of your Adapt course (you know you're in the right place if you have a Gruntfile.js), you can run any of the grunt tasks by typing grunt
followed by the task name:
For example,
grunt build
Below is a list of the available tasks. (For brevity, the grunt
portion has been left out.)
Task name | Description |
---|---|
help |
Lists out all available tasks along with descriptions. Useful to quickly look up what's available without having to leave the command line. Tip: Simply running grunt will have the same effect.
|
build |
Compiles all files in src to create a production-ready minified/compressed version of your course. Extra info: Each time you run build , grunt does the following: checks the JSON for errors, copies all assets, compiles the Less, compiles the handlebars templates, generates dynamic configuration options ( config.json and course.json ), inserts any missing tracking IDs, and finally compiles the js. This explains why it can take a while sometimes!
|
dev |
The same as build , with a few notable developer-friendly differences:
|
check-json |
Validates the course JSON, checks for duplicate IDs, and checks that each element has a parent. Note: This task runs during the build and dev tasks, so there is usually no need to run it manually.
|
tracking-insert |
Adds tracking identifiers to the relevant places in your JSON files. This task only fills in any missing IDs (any existing IDs are left), which can result in non-sequential numbering. If this bothers you, you can use tracking-reset .Note: This task runs during the build and dev tasks, so there is usually no need to run it manually.
|
tracking-remove |
Removes all tracking IDs from your JSON files. Use this if you aren't using a tracking plug-in such as adapt-contrib-spoor. Note: Leaving the IDs in has no detrimental effect. |
tracking-reset |
Resets all tracking IDs in your JSON files starting from 0. |
server |
Runs a local server on your machine and opens a browser window ready for you to test your course locally. Check the console output for the URL. |
server-scorm |
Same as above but provides a dummy SCORM interface to allow you to test the tracking of your course. |
translate:export |
Exports translatable text from the master course. |
translate:import |
Imports translated text files and creates a new language version of the course. |
Once you have built your course using build
or dev
, you are ready to upload it to a web server or LMS. To do this, you simply need to copy the files found in /build
according to the instructions for your specific platform.
- Framework in Five Minutes
- Setting up Your Development Environment
- Manual Installation of the Adapt Framework
- Adapt Command Line Interface
- Common Issues
- Reporting Bugs
- Requesting Features
- Creating Your First Course
- Styling Your Course
- Configuring Your Project with config.json
- Content starts with course.json
- Course Localisation
- Compiling, testing and deploying your Adapt course
- Core Plugins in the Adapt Learning Framework
- Converting a Course from Framework Version 1 to Version 2
- Contributing to the Adapt Project
- Git Flow
- Adapt API
- Adapt Command Line Interface
- Core Events
- Core Model Attributes
- Core Modules
- Web Security Audit
- Peer Code Review
- Plugins
- Developing Plugins
- Developer's Guide: Components
- Developer's Guide: Theme
- Making a theme editable
- Developer's Guide: Menu
- Registering a Plugin
- Semantic Version Numbers
- Core Model Attributes
- Adapt Command Line Interface
- Accessibility v3
- Adapt Framework Right to Left (RTL) Support