Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.
This repository was archived by the owner on May 5, 2021. It is now read-only.

adding new helpers like embed from handlebars does not work #317

@burza

Description

@burza

i cant get running the code from the docs

// assemble
gulp.task('assemble', function(done) {
    assemble({
        helpers: {
            markdown: require('helper-markdown')
        }
    });
    done();
});

My current code differs from the docs like this:

// assembly
function assembler(done) {
  fabAssemble({
    logErrors: config.dev,
    dest: config.dest,
    helpers: {
      // {{ default description "string of content used if description var is undefined" }}
      default: function defaultFn(...args) {
        return args.find(value => !!value);
      },
      markdown: require('helper-markdown'),

and then i'am getting still the following error msg:

[11:28:11] Error: Cannot find module 'helper-markdown'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:611:15)
    at Function.Module._load (internal/modules/cjs/loader.js:537:25)
    at Module.require (internal/modules/cjs/loader.js:665:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at assembler (/Users/burza/Projekte/ks-styleguide/gulpfile.js:160:17)
    at bound (domain.js:393:14)
    at runBound (domain.js:406:12)
    at asyncRunner (/Users/burza/Projekte/ks-styleguide/node_modules/async-done/index.js:55:18)
    at processTicksAndRejections (internal/process/next_tick.js:74:9)

how is it possible to add additionaly helpers like the embed helper?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions