title: How to include extra javascript library to be used by my custom jupyter notebook extension?
body: <p>I would like to write a Jupyter Notebook Extension as described here:
  <a href="https://towardsdatascience.com/how-to-write-a-jupyter-notebook-extension-a63f9578a38c" rel="noreferrer">https://towardsdatascience.com/how-to-write-a-jupyter-notebook-extension-a63f9578a38c</a></p>
  
  <p>Jupyter notebook seems to come with a default set of JavaScript libraries (e.g. jquery, underscore, ...). I found those libraries under </p>
  
  <pre><code>python-3.7.1.amd64\Lib\site-packages\notebook\static\components
  </code></pre>
  
  <p>My notebook extension needs further libraries, e.g. golden-layout.js and d3.js.</p>
  
  <p>=>Is it possible to define extra required JavaScript libraries, that will be installed to the above mentioned components folder when installing my extension? </p>
  
  <p>As a work around I could copy the libraries to a sub folder "bower_components" of my custom extension folder, e.g.</p>
  
  <pre><code>python-3.7.1.amd64\Lib\site-packages\jupyter_contrib_nbextensions\nbextensions\my_extension_folder\bower_components
  </code></pre>
  
  <p>Then I would try to adapt the require configuration to be able to load those libraries. However, that seems to be hacky and might cause issues with other extensions due to double installation of some libraries?</p>
  
  <p>=>What is the recommended way to fulfill my dependencies?</p>
  
  <p><strong>edit</strong></p>
  
  <p>There's no need to change require configuration if I use detailed paths starting with the relative root "nbextensions":</p>
  
  <pre><code>require([
      'nbextensions/my_extension_folder/bower_components/golden-layout/dist/goldenlayout.min',
      'nbextensions/my_extension_folder/bower_components/d3/d3.min'   
  ], function(
      GoldenLayout,
      d3  
  ) {             
    alert('foo');    
  });
  </code></pre>
  
  <p>I'm still wondering if that is the right way to go.    </p>