title: How to define a variable in require.config()
body: <p>I have a file structure which looks like this:</p>
  
  <pre><code>/js
  /vendor/
  /spec
   |-main.js
  </code></pre>
  
  <p><code>spec/min.js</code> is my entry point and from it I load modules in <code>/js,</code>  <code>/vendor</code>, <code>/spec</code></p>
  
  <p>Actually to make the things working properly I need to put <code>baseUrl: '../'</code>.<br>
  Since the directory js, vendor and spec have many subdirectories, is quite boring to handle them, also because If I change something in file structure I need to change a lot of strings.   </p>
  
  <p>My question is:
  is possible using requirejs to set different <code>paths</code> or a variable to which refer?<br>
  Obviously, without defining any global variable.</p>
  
  <p>Example:</p>
  
  <pre><code>require.config({
      baseUrl: '../',
      paths: {
         userView: 'js/users/views/userView' // how it works
         userView: baseDir + '/jquery' // possible solution where baseDir = js/users/views/
      }
  });
  </code></pre>