quickstart.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. _devquickstart:
  2. ======================
  3. Development Quickstart
  4. ======================
  5. .. _npm: https://www.npmjs.com/
  6. .. _Node.js: https://nodejs.org/
  7. SearXNG loves developers, just clone and start hacking. All the rest is done for
  8. you simply by using :ref:`make <makefile>`.
  9. .. code:: sh
  10. git clone https://github.com/searxng/searxng.git searxng
  11. Here is how a minimal workflow looks like:
  12. 1. *start* hacking
  13. 2. *run* your code: :ref:`make run`
  14. 3. *test* your code: :ref:`make test`
  15. If you think at some point something fails, go back to *start*. Otherwise,
  16. choose a meaningful commit message and we are happy to receive your pull
  17. request. To not end in *wild west* we have some directives, please pay attention
  18. to our ":ref:`how to contribute`" guideline.
  19. If you implement themes, you will need to setup a :ref:`make node.env` once:
  20. .. code:: sh
  21. make node.env
  22. Before you call *make run* (2.), you need to compile the modified styles and
  23. JavaScript:
  24. .. code:: sh
  25. make themes.all
  26. Alternatively you can also compile selective the theme you have modified,
  27. e.g. the *simple* theme.
  28. .. code:: sh
  29. make themes.simple
  30. If you finished your *tests* you can start to commit your changes. To separate
  31. the modified source code from the build products first run:
  32. .. code:: sh
  33. make static.build.restore
  34. This will restore the old build products and only your changes of the code
  35. remain in the working tree which can now be added & commited. When all sources
  36. are commited, you can commit the build products simply by:
  37. .. code:: sh
  38. make static.build.commit
  39. Commiting the build products should be the last step, just before you send us
  40. your PR. There is also a make target to rewind this last build commit:
  41. .. code:: sh
  42. make static.build.drop