File tree 4 files changed +9
-12
lines changed
4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ public function init(): void
20
20
{
21
21
parent ::init ();
22
22
23
- $ assetBootstrap = YII_ENV === 'prod '
24
- ? ['bootstrap.min.css ' , ' bootstrap.min.css. map ' ] : [' bootstrap.css ' , 'bootstrap.css.map ' ];
23
+ $ assetBootstrap = YII_ENV === 'prod ' ? [ ' bootstrap.min.css ' ] : [ ' bootstrap.css ' ];
24
+ $ assetBootstrapMap = YII_ENV === ' prod ' ? ['bootstrap.min.css. map ' ] : ['bootstrap.css.map ' ];
25
25
26
26
$ this ->css = $ assetBootstrap ;
27
- $ this ->publishOptions ['only ' ] = $ assetBootstrap ;
27
+ $ this ->publishOptions ['only ' ] = array_merge ( $ assetBootstrap, $ assetBootstrapMap ) ;
28
28
}
29
29
}
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ public function init(): void
27
27
{
28
28
parent ::init ();
29
29
30
- $ assetBootstrapPlugin = YII_ENV === 'prod '
31
- ? ['bootstrap.bundle.min.js ' , ' bootstrap.bundle.min.js. map ' ] : [' bootstrap.bundle.js ' , 'bootstrap.bundle.js.map ' ];
30
+ $ assetBootstrapPlugin = YII_ENV === 'prod ' ? [ ' bootstrap.bundle.min.js ' ] : [ ' bootstrap.bundle.js ' ];
31
+ $ assetBootstrapPluginMap = YII_ENV === ' prod ' ? ['bootstrap.bundle.min.js. map ' ] : ['bootstrap.bundle.js.map ' ];
32
32
33
33
$ this ->js = $ assetBootstrapPlugin ;
34
- $ this ->publishOptions ['only ' ] = $ assetBootstrapPlugin ;
34
+ $ this ->publishOptions ['only ' ] = array_merge ( $ assetBootstrapPlugin, $ assetBootstrapPluginMap ) ;
35
35
}
36
36
}
Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ public function init(): void
20
20
{
21
21
parent ::init ();
22
22
23
- $ assetPopper = YII_ENV === 'prod ' ? ['popper.min.js ' , 'popper.min.js.map ' ] : ['popper.js ' , 'popper.js.map ' ];
23
+ $ assetPopper = YII_ENV === 'prod ' ? ['popper.min.js ' ] : ['popper.js ' ];
24
+ $ assetPopperMap = YII_ENV === 'prod ' ? ['popper.min.js.map ' ] : ['popper.js.map ' ];
24
25
25
26
$ this ->css = $ assetPopper ;
26
- $ this ->publishOptions ['only ' ] = $ assetPopper ;
27
+ $ this ->publishOptions ['only ' ] = array_merge ( $ assetPopper, $ assetPopperMap ) ;
27
28
}
28
29
}
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ public function testBootstrapAssetRegister(): void
42
42
$ result = $ view ->renderFile (__DIR__ . '/support/main.php ' );
43
43
44
44
$ this ->assertStringContainsString ('bootstrap.css ' , $ result );
45
- $ this ->assertStringContainsString ('bootstrap.css.map ' , $ result );
46
45
}
47
46
48
47
public function testBootstrapCdnAssetSimpleDependency (): void
@@ -107,9 +106,7 @@ public function testBootstrapPluginAssetRegister(): void
107
106
$ result = $ view ->renderFile (__DIR__ . '/support/main.php ' );
108
107
109
108
$ this ->assertStringContainsString ('bootstrap.css ' , $ result );
110
- $ this ->assertStringContainsString ('bootstrap.css.map ' , $ result );
111
109
$ this ->assertStringContainsString ('bootstrap.bundle.js ' , $ result );
112
- $ this ->assertStringContainsString ('bootstrap.bundle.js.map ' , $ result );
113
110
}
114
111
115
112
public function testBootstrapPluginCdnAssetSimpleDependency (): void
@@ -180,7 +177,6 @@ public function testPopperAssetRegister(): void
180
177
$ result = $ view ->renderFile (__DIR__ . '/support/main.php ' );
181
178
182
179
$ this ->assertStringContainsString ('popper.js ' , $ result );
183
- $ this ->assertStringContainsString ('popper.js.map ' , $ result );
184
180
}
185
181
186
182
public function testPopperCdnAssetSimpleDependency (): void
You can’t perform that action at this time.
0 commit comments