Git Product home page Git Product logo

Comments (10)

groovytron avatar groovytron commented on June 14, 2024 2

@jozefizso I completely understand your point and in that case I would suggest I will just maintain a TypeScript fork so that I don't disturb your work. @mischah I will then update the dependencies to point to a package like @groovytron/generator-license in generator-license if that's fine for you. So that we have a solution that satisfies everybody.

And I'll see if I can move this issue to my fork. Otherwise I'll just copy it into mine.

Is that fine for everybody ?

Thanks for your inputs.

from generator-license.

mischah avatar mischah commented on June 14, 2024 1

I checked the https://github.com/yeoman/generator-generator source code and I don't see any reference to to this package there.

Just to let you know:
It’s a transitive dependency. Buried not that deep in the dependency tree:
generator-generatorgenerator-node → generator-license

Regarding TypeScript in the Yeoman generator eco system.
Using Typescript is not necessary at all. But it’s so damn comfortable to have a much more useful autocompletion in your Editor. So people using your generator when composing their generators would benefit from that. And yes, the additional built step sucks.

Chhers, Michael

from generator-license.

jozefizso avatar jozefizso commented on June 14, 2024

What issue does TypeScript solve here? The app and code is stable for years and well tested.

from generator-license.

groovytron avatar groovytron commented on June 14, 2024

I'm trying to upgrade yeoman/generator-generator (cf. this issue for more details) to use the latest version of yeoman-generator (which is 5.7.0 at the time of this writing).

As yeoman/generator-generator depends on generator-licenses, I started to try to migrate generator-license to TypeScript first.

The end result should be the same. There is no change on the end user point of view. It's just a dependencies upgrade.

And the tests remains the same which means nothing that was tested in the current version will break in the next version.

I hope it helps to understand the idea of this migration. I don't want to enforce it. I can still migrate my own fork if migrating to TypeScript is a no go.

from generator-license.

jozefizso avatar jozefizso commented on June 14, 2024

I checked the https://github.com/yeoman/generator-generator source code and I don't see any reference to to this package there.

If this package is to be used from TypeScript code a type definition file can be created. I don't see a point in rewriting this app and make it much more complicated with additional tools for compilation when it is working fine.

from generator-license.

jozefizso avatar jozefizso commented on June 14, 2024

So it's for these three lines https://github.com/yeoman/generator-node/blob/25d1ca4ea2122ce08b88398848e6df41f54cbe1a/generators/app/index.js#L363-L366

That can be done by type definition and not by requiring the whole project to be change to a different toolset.

from generator-license.

jozefizso avatar jozefizso commented on June 14, 2024

And the intellisense is already available:

const lic = require('generator-license');
const x = lic.licenses;

image

from generator-license.

mischah avatar mischah commented on June 14, 2024

A fork doesn’t make sense in this case. Since This project is maintained. Why don’t you use this as it is? And create a PR adding type definitions in case @jozefizso will accept to merge this.

What’s your pain with having a JavaScript dependency in a TypeScript Repo?

from generator-license.

jozefizso avatar jozefizso commented on June 14, 2024

I will accept TypeScript type definitions for this repo. The change to TypeScript tooling is our of question.

from generator-license.

groovytron avatar groovytron commented on June 14, 2024

I am really sorry. I didn't understand that having the types definition would actually solve the issue. Thanks for the explaination

I will then add the types definitions and open a PR for this. Thanks for the help and have both a nice weekend.

from generator-license.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.