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

Decouple the generated packages #12

Open
jodinathan opened this issue Nov 7, 2023 · 1 comment
Open

Decouple the generated packages #12

jodinathan opened this issue Nov 7, 2023 · 1 comment

Comments

@jodinathan
Copy link
Owner

Today the Typings package is huge because it bundles all lib bindings with it.

We could decouple them buy introducing some way for the dev to choose the libs it needs while also adding the option to choose the version.

Maybe something like this:

Consider the file typings.dart

@mt.MakeTypings([
  mt.AnimeJS(),
  mt.Deno(version: '1.2.3')
])
library foo;

import 'package:typings/make_typings.dart' as mt;

Then it would generate the bindings in the .dart_tool folder:
typings.animejs.dart, typings.deno.dart

Pretty much like AngularDart does with its templates.

Please let me know if you have any ideas

@leandroveronezi
Copy link

leandroveronezi commented Nov 23, 2023

Good idea,

First, I think it would be interesting to separate ts2dart from typings. Make it so that anyone can run ts2dart via the command line, generating the file in dart. The idea of having to clone the typings repository to be able to generate the library does not seem like a pleasant thing.

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

No branches or pull requests

2 participants