Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
bab32229
Commit
bab32229
authored
Apr 18, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added doc.
parent
611bc316
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
AssetBundle.php
framework/web/AssetBundle.php
+6
-1
AssetManager.php
framework/web/AssetManager.php
+4
-0
No files found.
framework/web/AssetBundle.php
View file @
bab32229
...
@@ -85,6 +85,11 @@ class AssetBundle extends Object
...
@@ -85,6 +85,11 @@ class AssetBundle extends Object
* @var array list of the bundle names that this bundle depends on
* @var array list of the bundle names that this bundle depends on
*/
*/
public
$depends
=
array
();
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.
* Initializes the bundle.
...
@@ -114,7 +119,7 @@ class AssetBundle extends Object
...
@@ -114,7 +119,7 @@ class AssetBundle extends Object
}
}
if
(
$this
->
sourcePath
!==
null
)
{
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
)
{
foreach
(
$this
->
js
as
$js
=>
$options
)
{
...
...
framework/web/AssetManager.php
View file @
bab32229
...
@@ -164,6 +164,10 @@ class AssetManager extends Component
...
@@ -164,6 +164,10 @@ class AssetManager extends Component
* Note, in case $forceCopy is false the method only checks the existence of the target
* Note, in case $forceCopy is false the method only checks the existence of the target
* directory to avoid repetitive copying (which is very expensive).
* 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
* 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
* 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'
* that holds the published assets. This problem can be avoided altogether by 'requesting'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment