_handlebarsInit() {
        let helpers = this.config.helpers;
        const self = this;

        function addInternalHelpers(modulePath) {
            const helperModule = require(path.resolve(self.path, modulePath));
            const instance = helperModule(self);

            Object.keys(instance).forEach(key => {
                handlebars.registerHelper(key, instance[key]);
            });
        }

        if (!Array.isArray(helpers)) {
            helpers = [helpers];
        }

        // add external helpers
        handlebarsLayouts.register(handlebars);

        // add Baseline helpers
        helpers.forEach(addInternalHelpers, this);

        handlebars.log = log;

        this._loadViews();

        return this;
    }
/**
     * Set up Handlebars to use the appropriate views, helper functions, and translation strings.
     *
     * @private
     * @returns {this}
     */
Set up Handlebars to use the appropriate views, helper functions, and translation strings.
@private
@returns {this}
Set up Handlebars to use the appropriate views helper functions and translation strings . @private @returns { this }
_handlebarsInit() {
        let helpers = this.config.helpers;
        const self = this;
        function addInternalHelpers(modulePath) {
            const helperModule = require(path.resolve(self.path, modulePath));
            const instance = helperModule(self);
            Object.keys(instance).forEach(key => {
                handlebars.registerHelper(key, instance[key]);
            });
        }
        if (!Array.isArray(helpers)) {
            helpers = [helpers];
        }
        handlebarsLayouts.register(handlebars);
        helpers.forEach(addInternalHelpers, this);
        handlebars.log = log;
        this._loadViews();
        return this;
    }
_handlebarsInit ( ) { let helpers = this . config . helpers ; const self = this ; function addInternalHelpers ( modulePath ) { const helperModule = require ( path . resolve ( self . path , modulePath ) ) ; const instance = helperModule ( self ) ; Object . keys ( instance ) . forEach ( key => { handlebars . registerHelper ( key , instance [ key ] ) ; } ) ; } if ( ! Array . isArray ( helpers ) ) { helpers = [ helpers ] ; } handlebarsLayouts . register ( handlebars ) ; helpers . forEach ( addInternalHelpers , this ) ; handlebars . log = log ; this . _loadViews ( ) ; return this ; }
Set up Handlebars to use the appropriate views, helper functions, and translation strings.
Set up Handlebars to use the appropriate views helper functions and translation strings .
// add external helpers // add Baseline helpers