create-near-app
create-near-app copied to clipboard
Only create frontend template
Currently by default it creates a full stack application. Which means that if building for existing app - need to deal with all the contract stuff. Ideally something like --frontend flag
How about --no-contract
or --contract none
--contract none
is interesting given this flag already exists
On Tue, Dec 15, 2020 at 4:44 AM Chad Ostrowski [email protected] wrote:
How about --no-contract or --contract none
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/near/create-near-app/issues/609#issuecomment-745264763, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABK27VQKW472HWW5UNA5STSU5K3VANCNFSM4U4IBYBQ .
-- Best regards, Illia Polosukhin
An interesting idea I had; I'm not sure I like this or not: a value to --contract
other than rust
or assemblyscript
is assumed to be an account name, and will result in no contract
directory being added to the project, and the frontend contract initialization instead will be initialized to connect to the given --contract
value. Once we have a good metadata API, we can also add the proper viewMethods
and changeMethods
, but for now we can add a TODO
comment to the spot where the contract is initialized.
Thoughts?
This is interesting in principle, but I want to point out that many frontends would work with various different contracts of the same shape. E.g. multisig, lockups, DAOs, etc.
Also names on mainnet and testnet will be different.
So yeah, it should be more pointing at contract metadata to generate the view methods. That said I haven't personally ever used Contract abstraction - account.functionCall works fine and you don't need to specify stuff ahead of time.
Obviously, in TypeScript world having more strict typing probably is better but not sure if your current Contract abstraction actually does that.
I would also avoid overloading one parameter with multiple meaning - this is generally a counter-pattern
On Wed, Dec 16, 2020 at 12:43 PM Chad Ostrowski [email protected] wrote:
An interesting idea I had; I'm not sure I like this or not: a value to --contract other than rust or assemblyscript is assumed to be an account name, and will result in no contract directory being added to the project, and the frontend contract initialization instead will be initialized to connect to the given --contract value. Once we have a good metadata API, we can also add the proper viewMethods and changeMethods, but for now we can add a TODO comment to the spot where the contract is initialized.
Thoughts?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/near/create-near-app/issues/609#issuecomment-746983804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABK27SSKYVIB56SJXT6JZDSVELWBANCNFSM4U4IBYBQ .
-- Best regards, Illia Polosukhin
4 years later, create-near-app
creates either a contract or a frontend.