yo icon indicating copy to clipboard operation
yo copied to clipboard

Enable ESNext syntax for generators

Open Natejoestev opened this issue 1 year ago • 2 comments

feature

it would be nice to use ESNext syntax in my generator.

I just moved one of my generators to typescript and i'm using import & export. when i use tsc, it can convert to CommonJS, but when i run it, it doesn't like it.

i don't want to have to use require() and exports.

Natejoestev avatar Dec 20 '23 16:12 Natejoestev

Resend my email

🐍🕊🤴

On Wed, Dec 20, 2023 at 11:22 PM, Natejoestev @.***> wrote:

feature

it would be nice to use ESNext syntax in my generator.

I just moved one of my generators to typescript and i'm using import & export. when i use tsc, it can convert to CommonJS, but when i run it, it doesn't like it.

i don't want to have to use require() and exports.

— Reply to this email directly, view it on GitHub https://github.com/yeoman/yo/issues/801, or unsubscribe https://github.com/notifications/unsubscribe-auth/A64X2MJQQMRBI52K4MX4GRLYKMJT3AVCNFSM6AAAAABA5D75Y6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TAOJTGQZTGMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

PyaePhyo8612 avatar Dec 20 '23 18:12 PyaePhyo8612

I refactored a generator to use import & export. It took a lot of debugging to figure out but I ultimately prevailed. https://github.com/yenoh2/generator-hac-tf-module

yenoh2 avatar Jul 01 '24 15:07 yenoh2