Yii Framework Forum: Yii2 Assetbundle 的疑问 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii2 Assetbundle 的疑问 Rate Topic: -----

#1 User is offline   sharehua 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 455
  • Joined: 30-December 08

Posted 02 March 2014 - 08:53 PM

我编写了个类注册 css等文件。但修改css后,web/assets里面的内容不同步更新,得删除才会再生成。这个在开发阶段很麻烦,有没有好的方法在开发阶段自动更新?

class SiteAsset extends AssetBundle
{
	public $sourcePath = '@backend/assets';
	public $css = ['css/site.css'];
	public $js = [''];
	public $jsOptions=['position'=>1];
	public $depends = [
		'yii\web\YiiAsset',
		'yii\bootstrap\BootstrapAsset',
	];
}

YII2 技术群【QQ群--146409855】,欢迎朋友,拒绝过客
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,880
  • Joined: 04-October 08
  • Location:DC, USA

Posted 03 March 2014 - 01:20 PM

public $publishOptions = ['forceCopy' => true];
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users