repo.rst 2.4 KB

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