-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[Cookbook][Assetic][Apply filter] Added node_paths /usr/lib/node_modules REQUIRED #2775
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ as you'll see here, files that have a specific extension. To show you how | |
to handle each option, let's suppose that you want to use Assetic's CoffeeScript | ||
filter, which compiles CoffeeScript files into Javascript. | ||
|
||
The main configuration is just the paths to coffee and node. These default | ||
respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``: | ||
The main configuration is just the paths to coffee, node and node_modules. These default | ||
respectively to ``/usr/bin/coffee``, ``/usr/bin/node`` and ``/usr/lib/node_modules``: | ||
|
||
.. configuration-block:: | ||
|
||
|
@@ -22,6 +22,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``: | |
coffee: | ||
bin: /usr/bin/coffee | ||
node: /usr/bin/node | ||
node_paths: [ /usr/lib/node_modules/ ] | ||
|
||
.. code-block:: xml | ||
|
||
|
@@ -30,7 +31,8 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``: | |
<assetic:filter | ||
name="coffee" | ||
bin="/usr/bin/coffee" | ||
node="/usr/bin/node" /> | ||
node="/usr/bin/node" | ||
node_paths="/usr/lib/node_modules/"/> | ||
</assetic:config> | ||
|
||
.. code-block:: php | ||
|
@@ -41,6 +43,7 @@ respectively to ``/usr/bin/coffee`` and ``/usr/bin/node``: | |
'coffee' => array( | ||
'bin' => '/usr/bin/coffee', | ||
'node' => '/usr/bin/node', | ||
'node_paths' => '/usr/lib/node_modules/', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right, is a collection of node paths, as said, not tested on PHP, for those using PHP configuration, please comment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JoeRobles the PHP configuration works in a similar way than the Yaml one. So you should indeed pass an array |
||
), | ||
), | ||
)); | ||
|
@@ -128,6 +131,7 @@ applied to all ``.coffee`` files: | |
coffee: | ||
bin: /usr/bin/coffee | ||
node: /usr/bin/node | ||
node_paths: [ /usr/lib/node_modules/ ] | ||
apply_to: "\.coffee$" | ||
|
||
.. code-block:: xml | ||
|
@@ -138,6 +142,7 @@ applied to all ``.coffee`` files: | |
name="coffee" | ||
bin="/usr/bin/coffee" | ||
node="/usr/bin/node" | ||
node_paths="/usr/lib/node_modules/" | ||
apply_to="\.coffee$" /> | ||
</assetic:config> | ||
|
||
|
@@ -149,6 +154,7 @@ applied to all ``.coffee`` files: | |
'coffee' => array( | ||
'bin' => '/usr/bin/coffee', | ||
'node' => '/usr/bin/node', | ||
'node_paths' => '/usr/lib/node_modules/', | ||
'apply_to' => '\.coffee$', | ||
), | ||
), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
underscores should be dashes. Also I'm not sure if this works, maybe we have to use
<node-path>/usr/lib/node_modules/</node-path>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'r right, I used YAML, not tested on XML or PHP, if someone has tested if, please comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it cannot be configured at all in XML because the XSD has not been updated for it. but once done, it would look like this to allow a collection: