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

Add template support for solidityVersion, networks and tailwind extend #109

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

carletex
Copy link
Member

@carletex carletex commented Sep 2, 2024

Since we already have those files (hardhat & tailwind config) on a template, I wonder if we should add some handy stuff.

  • Solidity version
  • Networks
  • Tailwind extend theme

You can test with https://github.com/carletex/create-eth-extensions/tree/tailwind-extend-solidity-version

yarn cli -e carletex/create-eth-extensions:tailwind-extend-solidity-version

What do you think?

(I'll add the changeset if we like this)

rin-st
rin-st previously approved these changes Sep 2, 2024
Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

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

Lgtm! Tested and everything is working!

@rin-st
Copy link
Member

rin-st commented Sep 2, 2024

Lgtm! Tested and everything is working!

Update: not everything :)

If no networks or extendTheme in your extension, formatting and hence creating instance from create-eth breaks

@carletex
Copy link
Member Author

carletex commented Sep 2, 2024

Thanks Rinat, good catch!! Should be fixed here: 0932d22 (used && instead of ternary, I think it should be fine in this case and nothing like "false" should get printed)

(I'm sure we had a good reason for it, but having some of these values as arrays (e.g. solidityVersion) is a bit confusing.... and then when we add the default at the bottom of the file, it's just a string :()

@rin-st
Copy link
Member

rin-st commented Sep 2, 2024

(I'm sure we had a good reason for it, but having some of these values as arrays (e.g. solidityVersion) is a bit confusing.... and then when we add the default at the bottom of the file, it's just a string :()

Yes, I also noticed that it's not so good.

As I remember, it's because theoretically when using multiple extensions, some of those extensions could have same variables. So they'd be collected into arrays.

I'll play with it next days at least to know the code better. Not sure I'll change something :)

Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

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

Thanks @carletex also Rinat for review!! Works great!

@technophile-04 technophile-04 merged commit 2064f18 into main Sep 4, 2024
1 check passed
@technophile-04 technophile-04 deleted the solidity-version-networks-extend-theme branch September 4, 2024 07:13
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.

3 participants