-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert Mix dependence on Request, Add unit tests
Remove redundant listener tags from phpunit.xml.dist Apply better solution to remove asset timestamping from the cake3 branch Add unit tests to test css() and script() AssetMixHelper methods
- Loading branch information
1 parent
0720f50
commit 254f81e
Showing
11 changed files
with
128 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<?php | ||
|
||
use Cake\Routing\Route\DashedRoute; | ||
use Cake\Routing\RouteBuilder; | ||
use Cake\Routing\Route\DashedRoute; | ||
use Cake\Routing\RouteBuilder; | ||
|
||
/** @var RouteBuilder $routes */ | ||
$routes->plugin( | ||
'AssetMix', | ||
['path' => '/asset-mix'], | ||
function (RouteBuilder $routes) { | ||
$routes->fallbacks(DashedRoute::class); | ||
}); | ||
/** @var \Cake\Routing\RouteBuilder $routes */ | ||
$routes->plugin( | ||
'AssetMix', | ||
['path' => '/asset-mix'], | ||
function (RouteBuilder $routes) { | ||
$routes->fallbacks(DashedRoute::class); | ||
} | ||
); |
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 @@ | ||
# Using AssetMix Plugin when Serving CakePHP from a Subdirectory | ||
|
||
To use the AssetMixHelper methods `$this->AssetMix->css('main)` and `$this->AssetMix->script('app')` when CakePHP is being served out of a subdirectory. For example you access your CakePHP application from https://example.com/subdir and NOT https://example.com/ | ||
|
||
Configure `App.base` with `/subdir`: | ||
|
||
```php | ||
// config/app.php | ||
'App' => [ | ||
'namespace' => 'App', | ||
'encoding' => env('APP_ENCODING', 'UTF-8'), | ||
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_AU'), | ||
'defaultTimezone' => 'Australia/Melbourne', | ||
// comment or remove the default | ||
// 'base' => false, | ||
// hard coded | ||
'base' => '/subdir', | ||
// or pull from the environment to make it portable | ||
// 'base' => env('SUBDIR', false), | ||
'language' => 'en', | ||
'dir' => 'src', | ||
'webroot' => 'webroot', | ||
'wwwRoot' => WWW_ROOT, | ||
//... | ||
] | ||
``` |
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
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 |
---|---|---|
|
@@ -9,5 +9,5 @@ window.Vue = Vue; | |
Vue.component('app-greet', AppGreet); | ||
|
||
const app = new Vue({ | ||
el: '#app' | ||
el: '#app' | ||
}); |
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