Share your code.
module-sorterpublic
module-sorter
Sort modules by dependencies
Install
$ npm install module-sorter
Usage
+---------+ | main.js | +---------+ | require V +---------+ +---------+ | foo.js | -> | baz.js | +---------+ +---------+ | | ^ | +---------+ | | | | V V | +---------+ +---------+ | bar.js | | qux.js | +---------+ +---------+
var moduleSorter = ; moduleSorter; // [ // "path/to/bar.js", // "path/to/baz.js", // "path/to/foo.js", // "path/to/main.js" // ]
API
sort(root : string) : array[string]
License
module-sorter is available under the The MIT License.