benawad / destiny

Prettier for File Structures
MIT License
3.53k stars 81 forks source link

Documentation on best/common way to integrate into a project #144

Open andria-dev opened 4 years ago

andria-dev commented 4 years ago

As it currently stands, I can't seem to find a great way to integrate Destiny into a project. When should I be running Destiny? I mean, ideally, it would be whenever an import is changed or when a file is referenced/created.

The only way I've found to run it consistently is to run it on pre-commit with husky, is that the best practice currently? What do you do for this repo?

All of this information might be useful in your documentation.

AnatoleLucet commented 4 years ago

On this repo will still manualy run Destiny on src. But maybe a day we'll switch to a lint stage or a husky hook. I personally use it that way on another project.

A watch mode has been mentioned in #17. It could be a possible way to use it.

There's also a discussion in #112 about a "flat structure" on the remote repo.

I though about an IDE plugin, but I don't know if it would be viable.