title: How to add npm dependency as peer dependency
body: <p>Does npm have the option to install dependency as peer-dependency like yarn option <code>--yarn</code>, instead of adding it manually for example:</p>
  <pre><code>&quot;peerDependencies&quot;: {
    &quot;@angular/core&quot;: &quot;^7.0.0&quot;
  }
  </code></pre>
  <hr />
  <p><strong>Update</strong> with more clarification of the question, thanks to @Broncha</p>
  <p>The question is how to add a peer dependency to a project. That is</p>
  <ul>
  <li><code>npm i dep</code> adds the dependency to the &quot;dependencies&quot; in package.json,</li>
  <li><code>npm i -D dep</code> adds the dependency to the &quot;devDependencies&quot; in package.json.</li>
  </ul>
  <p>How do I install a dependency that adds it to the &quot;peerDependencies&quot; in package.json?</p>