fix: remove unused dependencies
According to howfat
, Kotahi has 470mb of dependencies, which can take quite a while to install. I remove all unused dependencies from the project in this request.
Useful commands:
View dependency costs
npx howfat -r tree
Check unused dependencies
npx depcheck
Remove dependencies - Note: a couple dependencies of the project are erroneously listed, and I did not remove those
npx depcheck --json | jq '.dependencies[]' | xargs -L1 npm rm
View sorted dependency costs
c = open('out2.txt','r').read().strip().split('\n')
rows = sorted(c, key=lambda l: eval(l.split(',')[1].replace('mb', '*1000').replace('kb', '*1')), reverse=True)
for l in rows:
print(l)
npx howfat -r tree > out.txt && cat out.txt | grep '^(├─┬)' > out2.txt && python3 main.py && rm out.txt out2.txt