Commit bab32229 by Qiang Xue

Added doc.

parent 611bc316
......@@ -85,6 +85,11 @@ class AssetBundle extends Object
* @var array list of the bundle names that this bundle depends on
*/
public $depends = array();
/**
* @var array the options to be passed to [[AssetManager::publish()]] when the asset bundle
* is being published.
*/
public $publishOption = array();
/**
* Initializes the bundle.
......@@ -114,7 +119,7 @@ class AssetBundle extends Object
}
if ($this->sourcePath !== null) {
list ($this->basePath, $this->baseUrl) = $am->publish($this->sourcePath);
list ($this->basePath, $this->baseUrl) = $am->publish($this->sourcePath, $this->publishOption);
}
foreach ($this->js as $js => $options) {
......
......@@ -164,6 +164,10 @@ class AssetManager extends Component
* Note, in case $forceCopy is false the method only checks the existence of the target
* directory to avoid repetitive copying (which is very expensive).
*
* By default, when publishing a directory, subdirectories and files whose name starts with a dot "."
* will NOT be published. If you want to change this behavior, you may specify the "beforeCopy" option
* as explained in the `$options` parameter.
*
* Note: On rare scenario, a race condition can develop that will lead to a
* one-time-manifestation of a non-critical problem in the creation of the directory
* that holds the published assets. This problem can be avoided altogether by 'requesting'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment