generated from yii2-extensions/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
JQueryProviderAsset::class
. (#14)
- Loading branch information
1 parent
836c92c
commit e107da3
Showing
4 changed files
with
54 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yii2\Extensions\DateTimePicker\Asset; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* Eonasdan DateTimePicker JQuery provider asset bundle. | ||
*/ | ||
final class JQueryProviderAsset extends AssetBundle | ||
{ | ||
public $sourcePath = '@npm/eonasdan--tempus-dominus/dist/js'; | ||
|
||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$environment = defined('YII_ENV') ? YII_ENV : 'prod'; | ||
$jsFiles = $environment === 'prod' ? 'JQuery-provider.min.js' : 'JQuery-provider.js'; | ||
|
||
$this->js = [$jsFiles]; | ||
$this->publishOptions['only'] = [$jsFiles]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters