repo.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. .. _developer-guide:
  2. The JupyterLab Developer Guide is for developing JupyterLab extensions or developing JupyterLab itself.
  3. General Codebase Orientation
  4. ----------------------------
  5. The ``jupyterlab/jupyterlab`` repository contains two packages:
  6. - an npm package indicated by a ``package.json`` file in the repo's
  7. root directory
  8. - a Python package indicated by a ``setup.py`` file in the repo's root
  9. directory
  10. The npm package and the Python package are both named ``jupyterlab``.
  11. See the `Contributing
  12. Guidelines <https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md>`__
  13. for developer installation instructions.
  14. Directories
  15. ~~~~~~~~~~~
  16. NPM package: ``src/``, ``lib/``, ``typings/``, ``buildutils/``
  17. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  18. - ``src/``: the source typescript files.
  19. - ``jlpm run build`` builds the source files into javascript files
  20. in ``lib/``.
  21. - ``jlpm run clean`` deletes the ``lib/`` directory.
  22. - ``typings/``: type definitions for external libraries that typescript
  23. needs.
  24. - ``buildutils/``: Utilities for managing the repo
  25. Examples: ``examples/``
  26. ^^^^^^^^^^^^^^^^^^^^^^^
  27. The ``examples/`` directory contains stand-alone examples of components,
  28. such as a simple notebook on a page, a console, terminal, and a
  29. filebrowser. The ``lab`` example illustrates a simplified combination of
  30. components used in JupyterLab. This example shows multiple stand-alone
  31. components combined to create a more complex application.
  32. Testing: ``test/``
  33. ^^^^^^^^^^^^^^^^^^
  34. The tests are stored and run in the ``test/`` directory. The source
  35. files are in ``test/src/``.
  36. Notebook extension: ``jupyterlab/``
  37. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  38. The ``jupyterlab/`` directory contains the Jupyter server extension.
  39. The server extension includes a private npm package in order to build
  40. the **webpack bundle** which the extension serves. The private npm
  41. package depends on the ``jupyterlab`` npm package found in the repo's
  42. root directory.
  43. Git hooks: ``git-hooks/``
  44. ^^^^^^^^^^^^^^^^^^^^^^^^^
  45. The ``git-hooks/`` directory stores some convenience git hooks that
  46. automatically rebuild the npm package and server extension every time
  47. you check out or merge (via pull request or direct push to master) in
  48. the git repo.
  49. Documentation: ``docs/``
  50. ^^^^^^^^^^^^^^^^^^^^^^^^
  51. After building the docs (``jlpm run docs``), ``docs/index.html`` is the
  52. entry point to the documentation.