astral icon indicating copy to clipboard operation
astral copied to clipboard

use case: automatic refactoring

Open dominictarr opened this issue 12 years ago • 4 comments

occasionally, I see massive js projects that have a lot of good contents, but would be much more usable if they where split into parts.

this project https://github.com/openpgpjs/openpgpjs/ is just todays example, although there are other things about this project that makes it awkward (like gpl) there are many things purely from a code stand point that could be improved automatically.

For example, converting concatenated files into node/common.js which would allow fixing silly things like singleton objects: https://github.com/openpgpjs/openpgpjs/blob/master/src/util/util.js

Seems like the first part might be to draw a dependency tree. Which could be very useful on it's own...

dominictarr avatar May 30 '13 13:05 dominictarr

+1; thanks for the references.

btford avatar May 30 '13 21:05 btford

hope you don't mind me using your issues as a pin board for ideas!

dominictarr avatar May 30 '13 21:05 dominictarr

Not at all; please continue!

btford avatar May 30 '13 22:05 btford

excellent. In my travels I also discovered this

https://github.com/scripted-editor/scripted/wiki/Architecture#wiki-Inferencing

sounds like somewhere inside that massive project there is a static type inferencer that uses esprima

dominictarr avatar May 30 '13 22:05 dominictarr