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

Folder in init wollok init [folder] #190

Merged

Conversation

nmigueles
Copy link
Contributor

@nmigueles nmigueles commented Sep 21, 2024

Fix #189

Now the init command has an optional argument for the folder name.

image image

Known issue

Me esta creando la carpeta log por fuera y no veo donde se crea

@@ -39,7 +39,7 @@ export type FileContent = {

export const createFolderIfNotExists = (folder: string): void => {
if (!existsSync(folder)) {
mkdirSync(folder)
mkdirSync(folder, { recursive: true })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Capaz lo puedo pasar por parametro esto

Copy link
Contributor

Choose a reason for hiding this comment

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

No creo que haga falta

Copy link
Contributor

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

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

AAARRRRMMMOOSSSOOO ! 💯 🏆 🙌

Muchas graciaas, @nmigueles !

@@ -39,7 +39,7 @@ export type FileContent = {

export const createFolderIfNotExists = (folder: string): void => {
if (!existsSync(folder)) {
mkdirSync(folder)
mkdirSync(folder, { recursive: true })
Copy link
Contributor

Choose a reason for hiding this comment

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

No creo que haga falta

Comment on lines +19 to 31
export const pathAssertions: Chai.ChaiPlugin = (chai) => {
const { Assertion } = chai

Assertion.addMethod('pathExists', function (path) {
const exists = existsSync(path)
this.assert(
exists,
'expected path #{this} to exist',
'expected path #{this} to not exist',
path
)
})
}
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 👏 👏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me fallaba y me decia expected true, but false o algo asi, con esto dice el path exacto del archivo que falla, una belleza

@PalumboN PalumboN merged commit f1dd306 into uqbar-project:master Sep 22, 2024
1 check passed
@nmigueles nmigueles deleted the init/create-files-inside-folder branch September 22, 2024 20:14
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.

init command should create a new folder and place the content inside it
2 participants