Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    module-sorterpublic

    module-sorter

    NPM Version Dependency Status

    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 = require("module-sorter");
     
    moduleSorter.sort("main.js");
     
    // [ 
    //   "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.

    Keywords

    none

    install

    npm i module-sorter

    Downloadslast 7 days

    0

    version

    0.1.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar