simonharrer / textools

Helpful CLI for working with tex files.
10 stars 5 forks source link

Command 'clean' deletes the pdf file #5

Closed kiekmantau closed 10 years ago

lenhard commented 10 years ago

That is the purpose of clean, isn't it? Citing from the task's description: Removes all generated files during a tex build. This behavior is consistent with the clean commands of various build tools and what I would expect.

Why should clean ignore the pdf?

simonharrer commented 10 years ago

At the moment, the clean task deletes all files ignored via the .gitignore file or, if no .gitignore file can be found, using the .gitignore information that it would generate via the create-gitignore task.

By default, the pdfs are NOT ignored. We could add main.pdf to the default .gitignore file. Any comments?

lenhard commented 10 years ago

For reasons of consistency, I'd vote to add main.pdf to create-gitignore.

That way, you can still "remove" the pdf from the cleansing by removing it from your projects .gitignore (only then you add it to version control). To make the whole thing more user friendly, another option would be to add a flag to the clean command. Something like: textools clean --keep-pdf. But I guess adding flags is not that easy in the current state of the tool, is it?

stefan-kolb commented 10 years ago

In my opinion clean should do a full cleanup. If a user wants to keep the pdf, he can manually change that in his project.

simonharrer commented 10 years ago

The main.pdf file is now part of the default .gitignore and, therefore, part of the default clean task implementation.

Implemented in e30ecb908f5af4d2cccb28ce8bc167a36bf10154.