title: How to access options inside apos.define?
body: <p><code>apostrophe-workflow</code> has the following:</p>
  
  <p>public/js/user.js</p>
  
  <pre><code>apos.define('apostrophe-workflow', {
  
    [...]
  
    construct: function(self, options) {
  
      self.locales = options.locales;
      self.locale = options.locale;
      [...]
  </code></pre>
  
  <p>I searched quite a while and did not manage to find the reason why this construct method has access to the <code>options</code> object. I tried <code>browserCall</code> but am not sure how to use this properly.</p>
  
  <p>My assets are pushed using <code>pushAsset</code>, too. But they do not have access to the options after <code>apos.create</code>.</p>
  
  <p><strong>Edit: Example scenario:</strong></p>
  
  <p>A simple module that pushes one script to the browser.</p>
  
  <p>module/index.js</p>
  
  <pre><code>construct: function(self, options) {
    self.pushAsset('script', 'name', {when: 'always'});
  }
  </code></pre>
  
  <p>And takes one option.</p>
  
  <p>app.js</p>
  
  <pre><code>modules: {
    'module': {
      option: 'Option'
    }
  }
  </code></pre>
  
  <p>The script should use this option on <code>construct</code>.</p>
  
  <p>module/public/js/script.js</p>
  
  <pre><code>apos.define('module-script', {
    construct: function(self, options) {
      console.log(options.option); // Print 'Option' to console.
    }
  });
  </code></pre>
  
  <p>Another module will call <code>apos.create('module-script')</code>.</p>
  
  <p>I hope it's clear.</p>