Détail du package

imscc

twmulloy189MIT1.1.2

Courseware to IMS Common Cartridge archive transformer.

ims global, imscc, common cartridge, thin common cartridge

readme

IMSCC

Usage

Install

$ npm install --save imscc

Use

var imscc = require('imscc');

// Route to controller with `request` and `response` objects.
function (req, res) {
  var data = {}; // Perform some work to acquire data
    var options = {
    renderOpts: {
      pretty: false
    },
    // Adapter options depend on the specified adapter.
    // These as some Courseware Adapter options.
    adapterOpts: { 
      useExternal: true,
      environment: 'dev',
      version: 'v1p3t'
    }
  };

  var c = new imscc.Convert(imscc.Adapters.Courseware, data, options, true);

  return c.pipe(res);
}

Development

Install

$ npm i

Test

$ npm t

Lint

# Automatically run post tests
$ npm run lint

Coverage

# Run and open coverage report
$ npm run report

# Run coverage
$ npm run nyc

Build

$ npm run build

Publish

$ npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]

# Confirm have latest build `$ npm run build` before publishing
$ npm publish