Skip to content

Add Typescript support #20

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

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

christianlent
Copy link

Continuing on @tunnckoCore's excellent refactor, this additionally adds typescript support.

Charlike Mike Reagent and others added 21 commits November 14, 2018 09:06
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
@tunnckoCore
Copy link

tunnckoCore commented Apr 22, 2020

Oooh yea, it really was excellent... Thanks for reminding me about that.

Seems like I didn't port the templates tests here as commented there. 🤦‍♂️

Copy link

@tunnckoCore tunnckoCore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tunnckoCore
Copy link

@doowb @jonschlinkert heya, what's the state of the refactors and updates? Jon isn't very active last year...

@jonschlinkert
Copy link
Collaborator

what's the state of the refactors and updates? Jon isn't very active last year...

Hey, FWIW, I know you're not looking for a long explanation, but we've known each other a while and I thought you might like to know why we haven't seemed as active lately:

  1. We're working on something big, and it's very exciting, so we've been focused on making it happen. Everything that we've created on GitHub so far was to help us to get closer to achieving this big project.
  2. We've put countless hours of development into the next major releases of many of our "favorite" open source libraries, like assemble, update, verb, generate, enquirer, and a number of others. However, you might not see much activity on those projects on GItHub until we're ready to publish releases. That might seem counterintuitive, and it might seem like it defeats the very purpose of GitHub, but unfortunately it's a decision we've made after having code literally stolen from dev branches and republished as new libraries before we had the chance. This has happened more times than I can count, we never get attribution or any kind of credit for the concepts we created (and spend literally hundreds of hours of development on), and it's incredibly disheartening. Especially when we have to compete with libraries that stole our code: they get the early users and the community and buzz (for something we created), we look like the copycats, and most importantly it's no longer fun when that happens.

So, to be clear, we still love programming, we still love open source, and we're still spending the same amount of time developing open source tools, but we're spending less time putting small fires out and discussing details on GitHub.

I know that doesn't help your situation, but still, I thought you might want to know.

@tunnckoCore
Copy link

tunnckoCore commented Apr 24, 2020

I know you're not looking for a long explanation

Oh, I'm looking exactly for that, haha. You know I love the long read and writes.

Yea. It's exactly what I wanted to hear and I thought that that's what's happening. And we know I feel you. I'm not active that much anymore too. Open source is really fricking depressing thing, and a ton of people can't realize and even imagine how hard that "job" is.

It's crazy. Recently I discussed with one of my real-life best friends for years, and other peers through the years, the thing about Open Source and Free software, and they can't even comprehend and imagine the whole thing. How it can be super sad, but at the same time, a very powerful thing.

The whole work through the years is legendary, and the Node ecosystem is living and breathing every single day because of that exceptional amount of work. It's very empowering.

But yea, the community deserves your more private way, discussions, and privacy, exactly because of those bad events that happened multiple times. And I've seen them too.

I'm probably one of the few on your side. I'm planning something big too and I'm reconsidering my approach too. So... fair enough. I'm always open for you and your things and discussions, even in private.

I know that doesn't help your situation, but still, I thought you might want to know.

I just wanted to ensure what's happening and to see if we can proceed and merge some small things, because they are good.

@ilanl
Copy link

ilanl commented Aug 2, 2020

Exactly what I was looking for!
Is there a doc on how to use with typescript/handlebars ?

@tunnckoCore
Copy link

tunnckoCore commented Aug 6, 2020

@ilanl just "wrap" them and passed them to handlebars.

something like

const asyncAddHelper = asyncHelpers.wrapHelper('add', async (a, b) => a + b);
const asyncDivideHelper = asyncHelpers.wrapHelper('divide', async (a, b) => a / b);

// pass them to hbs ( don't remember if that was the hbs method)
hbs.registerHelpers({ asyncAddHelper, asyncDivideHelper });

or you can just pass an object to .wrapHelper (if you're using this refactor branch)

asyncHelpers.wrapHelper({
  foo: () => {},
  async bar() {}
})

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

Successfully merging this pull request may close these issues.

4 participants