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
cd9eb310
Commit
cd9eb310
authored
Apr 17, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Notes about `jsCompressor` and `cssCompressor` added to `assets.md`
parent
7f636fc5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
assets.md
docs/guide/assets.md
+9
-0
No files found.
docs/guide/assets.md
View file @
cd9eb310
...
@@ -207,6 +207,10 @@ The template itself looks like the following:
...
@@ -207,6 +207,10 @@ The template itself looks like the following:
* Please define these missing path aliases.
* Please define these missing path aliases.
*/
*/
return
[
return
[
// Adjust command/callback for JavaScript files compressing:
'jsCompressor'
=>
'java -jar compiler.jar --js {from} --js_output_file {to}'
,
// Adjust command/callback for CSS files compressing:
'cssCompressor'
=>
'java -jar yuicompressor.jar --type css {from} -o {to}'
,
// The list of asset bundles to compress:
// The list of asset bundles to compress:
'bundles'
=>
[
'bundles'
=>
[
// 'yii\web\YiiAsset',
// 'yii\web\YiiAsset',
...
@@ -239,6 +243,11 @@ everything to `path/to/web` that can be accessed like `http://example.com/` i.e.
...
@@ -239,6 +243,11 @@ everything to `path/to/web` that can be accessed like `http://example.com/` i.e.
JavaScript files are combined, compressed and written to
`js/all-{ts}.js`
where {ts} is replaced with current UNIX
JavaScript files are combined, compressed and written to
`js/all-{ts}.js`
where {ts} is replaced with current UNIX
timestamp.
timestamp.
`jsCompressor`
and
`cssCompressor`
are console commands or PHP callbacks, which should perform JavaScript and CSS files
compression correspondingly. You should adjust these values according to your environment.
By default Yii relies on
[
Closure Compiler
](
https://developers.google.com/closure/compiler/
)
for JavaScript file compression,
and on
[
YUI Compressor
](
https://github.com/yui/yuicompressor/
)
. You should install this utilities manually, if you wish to use them.
### Providing compression tools
### Providing compression tools
The command relies on external compression tools that are not bundled with Yii so you need to provide CSS and JS
The command relies on external compression tools that are not bundled with Yii so you need to provide CSS and JS
...
...
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