From 3537dea373f4d93de67ced03488e5de3f29ad543 Mon Sep 17 00:00:00 2001 From: Rodrigo Ferreira de Souza Date: Thu, 4 Oct 2018 15:31:07 -0300 Subject: [PATCH] Update docs --- README.rst | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.rst b/README.rst index ffa7591eb..8c9148ed2 100644 --- a/README.rst +++ b/README.rst @@ -153,6 +153,41 @@ Check the box next to ``collective.cover`` and click the 'Activate' button. You may have to empty your browser cache and save your resource registries in order to see the effects of the product installation. +Development +^^^^^^^^^^^ + +We use `webpack `_ to process static resources on this package. +Webpack processes SCSS and JS files, minifies the resulting CSS and JS, and optimizes all images. +The final JS file is also a UMD package, which provides compatibility with most popular script loaders. + +To contribute, you should start the instance in one shell and start webpack watcher on another with the following command: + +.. code-block:: bash + + $ bin/watch-cover + +Then go to ``webpack/app`` folder and edit SCSS and JS files; +Webpack watcher will automatically create the final resources in the right place. + +There are also other commands added to handle more complex scenarios. +The following command will set the buildout node installation in the system PATH, this way you can use webpack as described on its documentation. + +.. code-block:: bash + + $ bin/env-cover + +The following command generates JS and CSS without the minify step (it can be used to check the code being generated in a human readable way). + +.. code-block:: bash + + $ bin/debug-cover + +The following command rebuilds static files and exit (insted of keep watching the changes): + +.. code-block:: bash + + $ bin/build-cover + Upgrading from 1.x to 2.x ^^^^^^^^^^^^^^^^^^^^^^^^^