Search code examples
salesforce-commerce-cloud

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


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


Solution

  • 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