title: How do I set default options for traceur.compile and traceur.require?
body: <p>Using the official <a href="https://www.npmjs.org/package/traceur" rel="nofollow">traceur module</a>, is it possible to set the default options for <code>compile</code> and <code>require</code>?</p>
  
  <p>For example, this code works:</p>
  
  <pre><code>var traceur = require('traceur');
  console.log(
      traceur.compile('{ let x = 1; }', { experimental:true }).js
  );
  </code></pre>
  
  <p>Now if I remove <code>traceur.compile</code>'s 2nd argument (the options object):</p>
  
  <pre><code>console.log(
      traceur.compile('{ let x = 1; }').js
  );
  </code></pre>
  
  <p>Traceur will throw an error as the <code>blockBinding</code> option is not enabled. Is there any way to change the default options, in order to compile files without always passing an options object?</p>
  
  <p>My main concern, apart from applying the DRY principle, is getting the <code>traceur.require</code> function to compile files with customized options -- as far as I can see, <code>traceur.require</code> and <code>traceur.require.makeDefault()</code> do not even take an <code>options</code> argument.</p>
  
  <p>For instance, considering this code sample:</p>
  
  <pre><code>require('traceur').require('./index');
  </code></pre>
  
  <p>And this piece of code:</p>
  
  <pre><code>require('traceur').require.makeDefault();
  require('./index');
  </code></pre>
  
  <p>Is there any way to compile the required file with the <code>experimental</code> option enabled?<br>
  Preferably by altering the default options, as I cannot see any other viable way.</p>
  
  <p>Using Node 0.10.29 and Traceur 0.0.49.</p>
  
  <hr>
  
  <p>Here's a full example of what I'd like to achieve.</p>
  
  <p>bootstrap.js (entry point):</p>
  
  <pre><code>var traceur = require('traceur');
  traceur.options.experimental = true;
  traceur.require.makeDefault();
  require('./index');
  </code></pre>
  
  <p>index.js:</p>
  
  <pre><code>import {x} from './lib';
  
  // using a block binding in order to check
  // whether this file was compiled with experimental features enabled
  {
      let y = x;
      console.log(y);
  }
  </code></pre>
  
  <p>lib.js:</p>
  
  <pre><code>export var x = (() =&gt; { 
      if (true) {
          // should be compiled with experimental features enabled too
          let x = 1;
          return x;
      }
  })();
  </code></pre>
  
  <p>Expected console output: <code>1</code></p>
  
  <p><code>traceur.options.experimental=true</code> serves as a setter which enables the experimental features in the <code>traceur.options</code> object, but unfortunately <code>traceur.options</code> does not seem to affect <code>traceur.compile</code> nor <code>traceur.require</code> as far as I can see.</p>
  
  <hr>
  
  <p>The <a href="https://github.com/google/traceur-compiler/wiki/Using-Traceur-with-Node.js" rel="nofollow">Using Traceur with Node.js</a>  Wiki page does not mention anything about compiling options. The <a href="https://github.com/google/traceur-compiler/wiki/Options-for-Compiling" rel="nofollow">Options for Compiling</a> page does not mention the Traceur API in Node.js, in fact, I cannot find any documentation about the Traceur API in Node.js.</p>