Use -check to run formatter in check mode to see if code is properly formatted without modifying it. Run haxelib run formatter -s src/Main.hx to format file src/Main.hx. If you see dramatically slower performance when formatting the same codebase on multiple machines, it might be caused by one of the systems not being able to switch to NodeJS version and doing all the work in Neko instead. so it's the preferred version to run when bulk formatting larger code bases. NodeJS version is noticeably faster than Neko. so you might end up running Neko or NodeJS versions of formatter depending on your system setup and installed software. if you have NodeJS installed and working, then it will spawn a new process running run.js and passing all of your command line parameters to it. however Neko version will check for NodeJS (simply by calling node -v and checking its exit code). when running haxelib run formatter it always launches Neko version ( run.n). Note: haxelib version of formatter comes with both a NodeJS and a Neko version. Run haxelib run formatter -s src -s test to format folders src and test.Run haxelib run formatter -s src to format folder src.FeaturesĪpart from IDE integration, there's also a command line version of haxe-formatter that can be installed from haxelib: haxelib install formatter Bulk Formatting It's recommended to make a backup of your files and use a diff tool. A Haxe Code Formatter based on the tokentree library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |