Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide node path on configuration #4249

Merged
merged 4 commits into from
Sep 18, 2014
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions cookbook/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,34 @@ your JavaScripts:

You now have access to the ``uglifyjs2`` filter in your application.

Configure the ``node binary``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only enclose "node" with backticks:

Configure the ``node`` Binary

----------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use the name number of - characters as there are characters in the headline.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format that we use for the documentation is very strict for things like the length of the headings underlining. So please, reduce the underneath line length to match the length of the title. Thanks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The funny thing is that reST only complain about underlines that are too short.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabbuh reST allows longer underlines. Matching the length exactly is a matter of coding standards


he name of the binary is node you can skip this section.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first part of the phrase is missing: If the name of [...]

And you may enclose the name of the node binary file with quotes:

[...]  the binary is ``node`` you can skip [...]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would write something like

Assetic tries to find the node binary automatically. If it cannot be found, you'll be able to configure its location using the node key:


.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
assetic:
# the path to the node executable
node: /usr/bin/nodejs

.. code-block:: xml

<!-- app/config/config.xml -->
<assetic:config
node="/usr/bin/nodejs">
</assetic:config>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('assetic', array(
'node' => '/usr/bin/nodejs',
));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also keep the UglifyJs related part.


Minify your Assets
------------------

Expand Down