-
Notifications
You must be signed in to change notification settings - Fork 31
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
Feature/init convert #136
Feature/init convert #136
Conversation
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.
What's the distinction between contractName
and moduleName
?
@@ -1,7 +1,7 @@ | |||
import { expect, use } from "chai"; | |||
import chaiAsPromised from "chai-as-promised"; | |||
import {{contract_name_pascal}}Factory from "./typedContract/constructors/{{contract_name}}"; | |||
import {{contract_name_pascal}} from "./typedContract/contracts/{{contract_name}}"; | |||
import {{contract_name_pascal}}Factory from "../../typedContracts/{{contract_name}}/constructors/{{contract_name}}"; |
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.
Not only PSP22 template, but also all other ink!&ask! test templates as well, such as flipper.
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.
oh, a mistake on flipper, but ask! I left out on purpose since I'll remove them in next PR.
I noticed on imported contracts that directory name (used for |
I see, |
Oh, this is actually a bug in this PR, good catch! |
Main feature is introducing a
--convert
flag toinit
command. (#111 )Also handled are #113 and #83 .
Some changes to how
init
works are introduced:To test:
swanky init proj_name --convert path_to_existing_project
workspace
members
andexclude
fieldsmembers
are contracts, andexclude
are extra cratesNote: the converted project is not expected to work out-of-the-box when converted, but should require minimum adjustments.