gulp-scorm-manifest
A Gulp plugin that generates a valid SCORM IMS manifest file.
Getting Started
This plugin requires Gulp~0.4.2
If you haven't used Gulp before, be sure to check out the Docs Once you're familiar with that process, you may install this plugin with this command:
npm install gulp-scorm-manifest --save-dev
Once the plugin has been installed, it may be enabled inside your gulpfile with this line of JavaScript:
var scormManifest = require('gulp-scorm-manifest')
Node Libraries Used: xmlbuilder-js (for xml generation).
Options
options.version
Type:String
Default value: '2004'
Possible values: 2004||1.2
This is used to define which version of SCORM will be applied to the manifest.
options.courseId
Type:String
Default value: 'CourseID'
This is used to define the top-level course ID.
options.SCOtitle
Type:String
Default value: 'SCO Title'
This is used (by
<organization />
) to define the SCO title.options.moduleTitle
Type:String
Default value: 'Module'
This is used (by
<item />
) to define the SCO module title.options.launchPage
Type:String
Default value: 'index.html'
This is used to define the launchpage of the SCO.
options.path
Type:String
Default value: './'
This is used to define the path to which
imsmanifest.xml
will be written.Usage Example
This example creates a SCORM 2004 3rd Edition IMS manifest. The manifest will be written to the project directory and will include files in the project directory and all subdirectories.// simple single SCO package
var gulp = require('gulp');
var manifest = require('gulp-scorm-manifest');
gulp.task('manifest', function() {
gulp.src('build/data/**')
.pipe(manifest({
version: '2004',
courseId: 'Gulp101',
SCOtitle: 'Intro Title',
moduleTitle: 'Module Title',
launchPage: 'index.html',
path: 'data',
fileName: 'imsmanifest.xml'
}))
.pipe(gulp.dest('dist'))
});