Is there a way to find redundant code and variables in a Dart program?

I read somewhere that dart2js removes redundant code and variables. Is there a way in dart other than dart2js to check for redundant code and variables in a Dart program?

+4
source share
1 answer

Are you talking about tree trembling?

If this is the case, see this :

Launch the main application through the dart2js tool, which supports tree jitter for JavaScript and Dart outputs. Please note: there is no command line option for tree tremors, since dart2js always trembles. For simplicity, let me generate a Dart.

dart2js --output-type = dart embiggen.dart --categories = Server

Comment-based updated answer: dart2js is intended to be used as part of the build process. It can perform training, as well as other tasks, but cannot be used as assistance in the development process, that is, it cannot be used to reorganize your code. As far as I know, there is no such tool yet.

0
source

Source: https://habr.com/ru/post/1494186/


All Articles