src/prepare/partials.js
function registerPartials(src, options, prefix = '') {
  return readFiles(src.glob, options).then(partialFiles => {
    partialFiles.forEach(partialFile => {
      const partialKey = resourceId(partialFile, src.basedir, prefix);
      if (options.handlebars.partials.hasOwnProperty(partialKey)) {
        DrizzleError.error(
          new DrizzleError(
            `Partial key '${partialKey}' already
registered on Handlebars instance: is this intentional?`,
            DrizzleError.LEVELS.WARN
          ),
          options
        );
      }
      options.handlebars.registerPartial(partialKey, partialFile.contents);
    });
  });
}
function registerPartials(src, options, prefix = '') {
  return readFiles(src.glob, options).then(partialFiles => {
    partialFiles.forEach(partialFile => {
      const partialKey = resourceId(partialFile, src.basedir, prefix);
      if (options.handlebars.partials.hasOwnProperty(partialKey)) {
        DrizzleError.error(
          new DrizzleError(
            `Partial key '${partialKey}' already
registered on Handlebars instance: is this intentional?`,
            DrizzleError.LEVELS.WARN
          ),
          options
        );
      }
      options.handlebars.registerPartial(partialKey, partialFile.contents);
    });
  });
}
function registerPartials ( src , options , prefix = '' ) { return readFiles ( src . glob , options ) . then ( partialFiles => { partialFiles . forEach ( partialFile => { const partialKey = resourceId ( partialFile , src . basedir , prefix ) ; if ( options . handlebars . partials . hasOwnProperty ( partialKey ) ) { DrizzleError . error ( new DrizzleError ( ` ${ partialKey } ` , DrizzleError . LEVELS . WARN ) , options ) ; } options . handlebars . registerPartial ( partialKey , partialFile . contents ) ; } ) ; } ) ; }
Register the files matching `src.glob` as partials. Keys are generated by
using path relative to `src.basedir` separated by `.`
@param {Object} src    Object with `path` and `basedir` props
@see defaults
@param {Object} options
@param {String} prefix Gets passed to `resourceId` as the
`resourceCollection` argument. @see utils/object
@return {Promise}
Register the files matching src . glob as partials . Keys are generated by using path relative to src . basedir separated by .