-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathChatAsset.php
51 lines (46 loc) · 1.03 KB
/
ChatAsset.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
namespace jones\wschat;
use yii\web\AssetBundle;
/**
* Class ChatAsset
* @package jones\wschat
*/
class ChatAsset extends AssetBundle
{
public $css = [
'css/style.css'
];
public $js = [
'js/helper.js',
'js/chat.js',
'js/models/user.js',
'js/models/room.js',
'js/chat-room.js',
'js/collections/users.js',
'js/collections/rooms.js',
'js/views/message.js',
'js/views/chat.js',
'js/views/room.js',
'js/views/add_room.js',
'js/views/rooms.js',
'js/views/user.js',
'js/views/add_user.js',
'js/views/users.js',
'js/main.js',
];
public $depends = [
'jones\wschat\ChatLibAsset'
];
/**
* @inheritdoc
*/
public function init()
{
$this->sourcePath = __DIR__.'/assets/';
//set minimized version of js scripts for non debug version
if (!YII_DEBUG) {
$this->js = ['js/chat.min.js'];
}
parent::init();
}
}