code: function publicDocData(doc, extraData) {
    const options = _.assign(extraData || {}, { hasDemo: (doc.docType === 'directive') });
  
    // This RegEx always retrieves the last source descriptor.
    // For example it retrieves from `/opt/material/src/core/services/ripple/ripple.js` the following
    // source descriptor: `src/core/`.
    // This is needed because components are not only located in `src/components`.
    let descriptor = doc.fileInfo.filePath.toString().match(/src\/.*?\//g).pop();
    if (descriptor) {
      descriptor = descriptor.substring(descriptor.indexOf('/') + 1, descriptor.lastIndexOf('/'));
    }
  
    return buildDocData(doc, options, descriptor || 'components');
  }
docs: We don't need to publish all of a doc's data to the app, that will add many kilobytes of loading overhead.