Is there a way to identify unused script files in SFCC?

28 views Asked by At

We have project that started still on Pipelines and has gone through a lot of phases from using ds pipelets to partial migrations to controllers and require calls over imports.

We are sure, that a lot of dead code is in our repository but have no good way of identifying it.

Anybody knows about a tool or other way to figure this out?

Thx a lot! Andreas

1

There are 1 answers

0
Andreas On BEST ANSWER

Alright, so I extended my existing analyse library: https://github.com/Andreas-Schoenefeldt/SFCCAnalyser

You can clone the repository, and run:

npm i
npm start

follow the script afterwards and select detect unused code

enter image description here