You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ You can view information about Google Closure Compiler on this [link](https://de
9
9
10
10
Download **phpcc** Library. and then require <code>phpcc.class.php</code> in your <code>.php</code> file. You can test <code>sample.php</code> in <code>samples</code> folder.
11
11
12
-
<pre>
12
+
```php
13
13
require '../src/phpcc.class.php';
14
14
15
15
$phpcc = new PhpCc(array(
@@ -18,7 +18,7 @@ $phpcc = new PhpCc(array(
18
18
'output_path' => './output/',
19
19
'optimization' => 'SIMPLE_OPTIMIZATIONS'
20
20
));
21
-
</pre>
21
+
```
22
22
23
23
24
24
@@ -53,75 +53,75 @@ print_r($phpcc->help());
53
53
## How to compress
54
54
55
55
Add jQuery file and combined compression to one file.
56
-
<pre>
56
+
```php
57
57
$ary_result = $phpcc
58
58
->add("js/jquery-1.10.2.js")
59
59
->add("js/1.9/jquery-1.9.1.js")
60
60
->exec("all.js");
61
61
print_r($ary_result);
62
-
</pre>
62
+
```
63
63
64
64
65
65
66
66
----
67
67
68
68
Set Directory path find <code>.js</code> file and combined compression to one file.
69
-
<pre>
69
+
```php
70
70
$ary_result = $phpcc
71
71
->setDir("./js")
72
72
->exec("all.js");
73
73
print_r($ary_result);
74
-
</pre>
74
+
```
75
75
76
76
77
77
78
78
----
79
79
80
80
Use <code>single()</code> can individual compression.
81
-
<pre>
81
+
```php
82
82
$ary_result = $phpcc
83
83
->add("js/jquery-1.10.2.js")
84
84
->add("js/1.9/jquery-1.9.1.js")
85
85
->single()
86
86
->exec();
87
87
print_r($ary_result);
88
-
</pre>
89
-
<pre>
88
+
```
89
+
```php
90
90
$ary_result = $phpcc
91
91
->setDir("./js")
92
92
->single()
93
93
->exec();
94
94
print_r($ary_result);
95
-
</pre>
95
+
```
96
96
97
97
98
98
99
99
----
100
100
101
101
You can also mixed.
102
-
<pre>
102
+
```php
103
103
$ary_result = $phpcc
104
104
->add("js/jquery-1.10.2.js")
105
105
->add("js/1.9/jquery-1.9.1.js")
106
106
->setDir("./js")
107
107
->single()
108
108
->exec();
109
109
print_r($ary_result);
110
-
</pre>
110
+
```
111
111
112
112
113
113
114
114
----
115
115
116
116
You can use <code>param()</code> add Closure Compiler command param.
0 commit comments