Question: In this tiny sample app, why is `index-b.js` executing before `index-c.js`?

Since `index-c` is a dependency of `index-a`, and `index-a` is a set to load before `index-b`, it seems to me that `index-c` should execute first.

```
/* index.js */
define([ "./index-a", "./index-b" ], function(){    
    console.log("index executing");    
});

/* index-a.js */
define([ "./index-c" ], function(){    
    console.log("index-a executing");    
});

/* index-b.js */
define(function(){    
    console.log("index-b executing");    
});

/* index-c.js */
define(function(){    
    console.log("index-c executing");    
});

```

running example: <http://fitzgeraldmedia.net/requirejs/index.html> (check console)

Answer: 
The order of the modules in your define() call in index.js does not imply any synchronous dependencies, so index-a is not really "set to load" before index-b. Your define() call in index.js is simply stating that the code in the callback function is dependent on index-a and index-b. If index-b is dependent on index-a, then index-b should list index-a as a dependency in its define() call.

So your index.js file would look like this:

```
define([ "./index-b" ], function(){

    console.log("index.js executing");
});

```

and your index-b.js file would look like this:

```
define([ "./index-a" ], function(){

    console.log("index-b.js executing");

});

```
Try including the dependencies in `shim` property of your config

```
 'indexC': {
      deps: ['index-a']
  },

```

This makes sure `index-a` is loaded before loading `index-c`

```
    requirejs.config({

        baseUrl: "lib/",

        paths: {
            'jquery' : "vendor/jquery-2.0.2.min",
                'indexA' : 'app/ndex-a',
                'indexB' : 'app/ndex-b',
                'indexC' : 'app/ndex-c',
                'index'  : 'app/ndex',
        }

  });

```

Cause your `index-a` depends on `index-c`

replace

```
define([ "app/index-c" ], function(){

```

with

```
require([ "app/index-c" ], function(){

```