Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for Feedbacks! #12

Open
Errorname opened this issue Mar 22, 2019 · 1 comment
Open

Looking for Feedbacks! #12

Errorname opened this issue Mar 22, 2019 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Errorname
Copy link
Owner

Errorname commented Mar 22, 2019

Hi!

Do you use google-docs-mustaches in your project? Great! Let me know what you liked and disliked, what features you would love to have, and how you use it!

Thanks!🙏

@Errorname Errorname pinned this issue Mar 22, 2019
@antoinecarat antoinecarat added the help wanted Extra attention is needed label Apr 18, 2019
@LucBerge
Copy link

LucBerge commented Nov 2, 2021

I'm trying to integrate google-mustaches into a Pipedream workflow. Here is my code :

async (event, steps, params, auths) => {
  import Mustaches from 'google-docs-mustaches'
   
  const mustaches = new Mustaches({
    token: () => auths.google_drive.access_token
  })
   
  mustaches.interpolate({
    source: params.docId,
    destination: params.folderId,
    data: {
      firstname: 'Thibaud',
      lastname: 'Courtoison',
      accounts: [{ money: 1500 }]
    }
  })
}

I have the folling error TypeError: Mustaches is not a constructor. When creating workflows, I usually use require(...) instead of standard imports.

How can I bypass the problem ? Thanks

EDIT: Regarding this topic, you must add module.export = Mustaches somewhere in you code, so I can use it like this:

const Mustaches = require('google-docs-mustaches')

EDIT2: I have found the solution:

const Mustaches = require('google-docs-mustaches').default;

Maybe you should mentionned this tip in the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants