title: Is it possible to use js-yaml to load in a yaml file that has attributes set to file references?
body: <p>I am trying to use js-yaml to import a yml file into a js file.  The main yml file contains variables referenced in another file.<br />
  I am trying to find a way to get import the values of those extra references, but when I use safeLoad or load, the file loads in just the reference (not the actual value).</p>
  <p>Below is what the files look like, the expected outcome, and the actual outcome.</p>
  <p>Thanks for your help!</p>
  <p><strong>main.yml file</strong></p>
  <pre><code>otherAttribute:
     bar: 'foo'
  
  custom: ${file(otherFile.yml)}
  </code></pre>
  <p><strong>RotherFile.yml file</strong></p>
  <pre><code>key1: value
  key2: value
  </code></pre>
  <p><strong>js file</strong></p>
  <pre><code>  yaml = require(&quot;js-yaml&quot;);
    var example = yaml.load(fs.readFileSync(&quot;./main.yml&quot;, &quot;utf8&quot;));
    console.log('value of example read in via yaml.load',example);
  </code></pre>
  <p><strong>Desired Output</strong></p>
  <pre><code>otherAttribute:
     bar: 'foo'
  
  custom:
     key1: value
     key2: value
  </code></pre>
  <p><strong>Actual Output</strong></p>
  <pre><code>otherAttribute:
     bar: 'foo'
  
  custom: ${file(otherFile.yml):${self:otherAttribute.bar}}
  </code></pre>