-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat(cli): add --output
argument for single-contract compilation
#1793
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.
Neat!
src/cli/tact/index.ts
Outdated
const relativeOutputDir = normalize( | ||
join(dirname(filePath), outputDir), | ||
); | ||
(config.projects[0] as ConfigProject).output = relativeOutputDir; |
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.
Don't use unsafe casts.
Here's a branch with fixed types for Config
, so that all the fields there are readonly
, and we can use as const
type of createSingleFileConfig
to prove it has that [0]
field.
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.
Please rebase from this branch, and the error should go away.
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.
have a look now please @verytactical
src/cli/tact/index.ts
Outdated
export const createSingleFileConfig = (fileName: string) => | ||
export const createSingleFileConfig = ( | ||
fileName: string, | ||
outputDir: string = "./", |
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.
Why do we need a default value here?
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.
+1
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.
Please pass the default value directly where it's needed.
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.
@i582 @verytactical have a look now please!
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.
(forgot to start a review)
Issue
Closes #1784.
Checklist
docs/
and made the build locally