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

Feat/wizard #8

Merged
merged 18 commits into from
Nov 24, 2022
Merged

Feat/wizard #8

merged 18 commits into from
Nov 24, 2022

Conversation

Si3rr4wow
Copy link
Collaborator

@Si3rr4wow Si3rr4wow commented Nov 21, 2022

Ticket: #1

Screen.Recording.2022-11-22.at.15.10.54.mov

src/wizard.test.ts Outdated Show resolved Hide resolved
describe('getEntryPointPrompt', () => {
describe('initial value', () => {
it('matches the given document syntax', () => {
const randomString = Math.random().toString(36).substring(2)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest that we refactor this generator chain to its own utility function, as it's used in a few places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved out to test-utils and added tests for them

src/wizard.test.ts Outdated Show resolved Hide resolved
src/wizard.ts Outdated Show resolved Hide resolved
src/wizard.ts Show resolved Hide resolved
src/wizard.ts Outdated Show resolved Hide resolved
src/wizard.ts Show resolved Hide resolved
src/wizard.ts Outdated
}

export const init = async (): Promise<void> => {
const processDirectory = process.env.INIT_CWD?.split('/').reverse()[0] || ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Something to consider is that I think INIT_CWD isn't available by default on Windows systems, which is why it's an optional type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

Copy link
Collaborator Author

@Si3rr4wow Si3rr4wow Nov 24, 2022

Choose a reason for hiding this comment

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

This is now the much neater const processDirectory = path.parse(process.env.INIT_CWD || '').base

@Si3rr4wow Si3rr4wow mentioned this pull request Nov 24, 2022
@Si3rr4wow Si3rr4wow merged commit bf3af49 into main Nov 24, 2022
@Si3rr4wow Si3rr4wow deleted the feat/wizard branch November 24, 2022 15:16
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.

2 participants