builds.rst 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ======================
  2. Creating custom builds
  3. ======================
  4. .. contents:: Table of Contents
  5. :depth: 3
  6. :local:
  7. .. warning:: There current documentation in this section does not adequately
  8. explain how to create custom builds.
  9. .. _`minification`:
  10. Minification
  11. ============
  12. Minifying Javascript and CSS
  13. ----------------------------
  14. Please make sure to read the section :doc:`development` and that you have installed
  15. all development dependencies (long story short, you can run ``npm install``
  16. and then ``grunt fetch``).
  17. We use `require.js <http://requirejs.org>`_ to keep track of *Converse.js* and its dependencies and to
  18. to bundle them together in a single minified file fit for deployment to a
  19. production site.
  20. To minify the Javascript and CSS, run the following command:
  21. ::
  22. grunt minify
  23. Javascript will be bundled and minified with `require.js`_'s optimization tool,
  24. using `almond <https://github.com/jrburke/almond>`_.
  25. You can `read more about require.js's optimizer here <http://requirejs.org/docs/optimization.html>`_.
  26. CSS is minified via `cssmin <https://github.com/gruntjs/grunt-contrib-cssmin>`_.