/gift

GIFT format parser

Primary LanguageJavaScriptMIT LicenseMIT

GIFT format parser

CircleCI npm version Codacy Badge

A parser of assessment items written in GIFT format, implements Moodle 3.4 spec.

  • Vanilla isomorphic JavaScript, no dependencies.
  • Available in ES6, CommonJS and minified UMD formats.

Quickstart

var blockStrings = gift.Question.splitBlocks('2 * 3 equals {~5 =6 ~8 ~23}')
var block = gift.Block.fromString('{~5 =6 ~8 ~23}')

Development

Built with love and rollup/bublé.

Deployment

  1. Ensure tests are passed and linter does not have errors.
  2. Build the package: yarn build. It creates files in dist/.
  3. Update the version in package.json.
  4. Commit changes with 'REL:' prefix and tag the commit with 'v<pkg.version>' tag, e.g. v1.0.0.
  5. Publish the package npm publish.