Repository navigation
author 0.8.0
h5p-author 0.8.0 exports how a build reads a source's content type, so that a page that hands a chat a type's notes hands over the type the build took (#176, #177). Nothing else changes: no source builds otherwise, and no problem reads differently.
sourceType
sourceType(source, names), from ., ./core and ./browser: of the machine names given, the content type a source is written in, as the build reads it since 0.7.1. That is its type, as it is or as it is spoken of, "interactive-book", or with none the one name under contentType or library. It is null where none can be meant, and for a quiz in the published format ({ "kind": … }), which the build reads by rules of its own.
import { sourceType } from '@missing-elements/h5p-author/browser'
const listed = ['H5P.Blanks', 'H5P.InteractiveBook']
sourceType({ type: 'interactive-book', chapters: [] }, listed) // 'H5P.InteractiveBook'
sourceType({ contentType: 'H5P.Blanks', params: {} }, listed) // 'H5P.Blanks'
sourceType({ type: 'book' }, listed) // nullThe build page at missing-elements.github.io/h5p/build/ takes it next. It copied a source's problems with the type file of type as written, so a type named as it is spoken of, which a chat with no skill text writes, got no file. On the 328 sources the weak-model tests stored, sourceType names the type the build takes in every one.
Full Changelog: author-v0.7.1...author-v0.8.0