Add npm/react-tools COMPRESS_PRECOMPILERS example
This commit is contained in:
@@ -3,7 +3,20 @@
|
|||||||
Facebook React Support
|
Facebook React Support
|
||||||
======================
|
======================
|
||||||
|
|
||||||
Compiling React's jsx files can be done by creating a custom precompressor.
|
Assuming you have `npm` available by following the `react-tools installation instructions`_ and
|
||||||
|
adding an appropriate ``COMPRESS_PRECOMPILERS`` setting:
|
||||||
|
|
||||||
|
.. code-block:: django
|
||||||
|
|
||||||
|
COMPRESS_PRECOMPILERS = (
|
||||||
|
('text/jsx', 'cat {infile} | jsx > {outfile}'),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
.. _react-tools installation instructions: http://facebook.github.io/react/docs/tooling-integration.html#productionizing-precompiled-jsx
|
||||||
|
|
||||||
|
If the above approach is not suitable for you, compiling React's jsx files can be done by creating
|
||||||
|
a custom precompressor.
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|||||||
Reference in New Issue
Block a user