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

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

Open
burza opened this issue Apr 16, 2019 · 1 comment
Open

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

burza opened this issue Apr 16, 2019 · 1 comment

Comments

@burza
Copy link

burza commented Apr 16, 2019

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?

@emkajeej
Copy link

emkajeej commented May 1, 2019

do you have helper-markdown in your node_modules? If not, you might need to install that first.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants