kucherenko / jscpd

Copy/paste detector for programming source code.
MIT License
4.66k stars 204 forks source link

In v4 API is not working completely because everything is bundled in one file #666

Open ViktorSoroka07 opened 1 month ago

ViktorSoroka07 commented 1 month ago

So the moment the jscpd is imported, the bin IIFE is executed which is not desired. The latest v3 does not have such a problem. I'm using it for now.

To Reproduce Call API using the guide https://github.com/kucherenko/jscpd?tab=readme-ov-file#programming-api. Make sure to not use .jscpd.json. In my case, I wanted to configure everything inside either detectClones or jscpd function.

Expected behavior It works

Screenshots

v3 bundle output

Screenshot 2024-07-15 at 01 29 29

v4 bundle output

Screenshot 2024-07-15 at 01 31 49

Desktop (please complete the following information):

kucherenko commented 1 month ago

thank you, will fix