doc: Actualize information about generating snowball JS files (#10931)

This commit is contained in:
Dmitry Shachnev 2022-10-24 03:07:05 +03:00 committed by GitHub
parent b90bf8d193
commit 93215f0a64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,12 +326,11 @@ Debugging tips
* Set the debugging options in the `Docutils configuration file
<https://docutils.sourceforge.io/docs/user/config.html>`_.
* JavaScript stemming algorithms in ``sphinx/search/*.py`` (except ``en.py``)
are generated by this `modified snowballcode generator
<https://github.com/shibukawa/snowball>`_. Generated `JSX
<https://jsx.github.io/>`_ files are in `this repository
<https://github.com/shibukawa/snowball-stemmer.jsx>`_. You can get the
resulting JavaScript files using the following command::
* JavaScript stemming algorithms in ``sphinx/search/non-minified-js/*.js``
are generated using `snowball <https://github.com/snowballstem/snowball>`_
by cloning the repository, executing ``make dist_libstemmer_js`` and then
unpacking the tarball which is generated in ``dist`` directory.
npm install
node_modules/.bin/grunt build # -> dest/*.global.js
Minified files in ``sphinx/search/minified-js/*.js`` are generated from
non-minified ones using ``uglifyjs`` (installed via npm), with ``-m``
option to enable mangling.