-
Notifications
You must be signed in to change notification settings - Fork 5
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
developing extension(part 1) #73
Conversation
Thanks Shiv! Great changes! 👍 It makes developing of extension much easier! I left some comments, and also
I think it's not good since in
You mean push that |
Great work @technophile-04 !! And good comments from @rin-st! I'm working on the Ponder extension, so I will test this with that, and get back to you with comments and feedback! |
Yeah agree, pushed some changes to handle this. So currently if the package.json overlaps Solidity-frameworks package.json OR root package.json OR nextjs package.json we don't copy them and print info warning, But if the users want to add new package to monorepo(for example
yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updates! Great job!
This is looking great!!! Thanks Shiv + Rinat for the review! As Damu, I'll also be testing this during the week |
coreFiles: Files which belong to solidity frameworks OR base dir. Something we should be clear about in docs. Was discussing with Carlos about it and found a bug where we were copying |
@technophile-04 I was able to create the Ponder extension following the directions from this PR and #57 and everything worked great!!! https://github.com/damianmarti/ponder-se2-extension This is the extension created, I have to add the READMEs, I will do it on Monday. I have only two comments: Maybe it will be useful to be able to add items to scaffoldConfig. I wanted to add a ponderURL there and ended up using a process.env var directly, but I think it's better if we can have all this kind of config on the scaffoldConfig file. At first, I got some errors when I ran yarn cli (issues with my extension code), and the application was created anyway. And then I have to delete the folder to be able to run it again. Maybe, the cli can delete the created app folder if there is any error. Awesome job!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great @technophile-04
Thank you for tackling all open "issues" that we discussed.
Should we merge this? |
Ohh actually we thought merging the doc too in this PR #84 (comment) But maybe we can merge and iterate more on doc in that PR? |
Ok sure! In my head we could merge this since it doesn't affect users... but both things work for me! |
Yup merging this, we could also play around with this more and update #84 |
Developer extension flow:
create-eth
repo1.5) run
yarn build:dev
=> (this scripts createcli.js
andcreate-extension.js
insdist
dir)yarn cli
=> (runsdist/cli.js
)../my-instance
=> extension name will be "my-instance"my-instance/packages/nextjs/app/my-page/page.tsx
yarn create-extension ${instancePath}
=> runsdist/create-extension
yarn create-extension ../my-instance
my-instance
repo and create extensionin
create-eth/externalExtensions/${extensionName}
following same hierarchy compliant with external extensionsHeader.tsx
), we log him warning that he needs to create correspondingHeader.tsx.args.mjs
manually inextenalExtensions
package.json
we will be copying them completely if changed, sincepackage.json
are merged so common fields will be managed and new added package will also be added(the extension package.json will replace the version if it clashes with base)yarn create-extension ${instancePath}
cd
's into his created extension dir for exampleexternalExtensions/${extensionName}
and push that repo to github, which then can be used by others