repo.rst 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. 75b8171af... Fix clean:slate script and
  26. update docs
  27. Examples: ``examples/``
  28. ^^^^^^^^^^^^^^^^^^^^^^^
  29. The ``examples/`` directory contains stand-alone examples of components,
  30. such as a simple notebook on a page, a console, terminal, and a
  31. filebrowser. The ``lab`` example illustrates a simplified combination of
  32. components used in JupyterLab. This example shows multiple stand-alone
  33. components combined to create a more complex application.
  34. Testing: ``test/``
  35. ^^^^^^^^^^^^^^^^^^
  36. The tests are stored and run in the ``test/`` directory. The source
  37. files are in ``test/src/``.
  38. Notebook extension: ``jupyterlab/``
  39. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  40. The ``jupyterlab/`` directory contains the Jupyter server extension.
  41. The server extension includes a private npm package in order to build
  42. the **webpack bundle** which the extension serves. The private npm
  43. package depends on the ``jupyterlab`` npm package found in the repo's
  44. root directory.
  45. Git hooks: ``git-hooks/``
  46. ^^^^^^^^^^^^^^^^^^^^^^^^^
  47. The ``git-hooks/`` directory stores some convenience git hooks that
  48. automatically rebuild the npm package and server extension every time
  49. you check out or merge (via pull request or direct push to master) in
  50. the git repo.
  51. Documentation: ``docs/``
  52. ^^^^^^^^^^^^^^^^^^^^^^^^
  53. After building the docs (``jlpm run docs``), ``docs/index.html`` is the
  54. entry point to the documentation.