added support for define and require detection and file dependency sorting with default options