PHP code example of elephfront / application
1. Go to this page and download the library: Download elephfront/application library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elephfront / application example snippets
return [
'compile' => [
'css' => [
$config['paths']['source'] . 'assets' . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'home.scss' => $config['paths']['build'] . 'assets' . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'home.css',
]
]
];
return [
'compile' => [
'directories' => [
$config['paths']['source'] . 'assets' . DIRECTORY_SEPARATOR . 'fonts' . DIRECTORY_SEPARATOR => $config['paths']['build'] . 'assets' . DIRECTORY_SEPARATOR . 'fonts' . DIRECTORY_SEPARATOR,
]
]
];
use Cake\Event\EventManager;
EventManager::instance()->on('Elephfront.Scss.beforeCompile', function(\Cake\Event\Event $event) {
$robo = $event->getSubject();
$robo
->taskCopyDir([
'vendor/zurb/foundation/scss' => 'src/assets/css/libs/foundation',
'vendor/zurb/foundation/_vendor/normalize-scss' => 'src/assets/css/libs/normalize-scss',
'vendor/zurb/foundation/_vendor/sassy-lists' => 'src/assets/css/libs/sassy-lists',
])
->run();
$robo->taskReplaceInFile('src/assets/css/libs/foundation/foundation.scss')
->from('../_vendor')
->to('../')
->run();
});