Skip to content

Instantly share code, notes, and snippets.

@Saeven
Created April 6, 2017 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saeven/1c0a8311268b3240514bd8cd266b2711 to your computer and use it in GitHub Desktop.
Save Saeven/1c0a8311268b3240514bd8cd266b2711 to your computer and use it in GitHub Desktop.
Same controller-based gist for Assetic
<?php
return [
'controllers' => [
\SilverStarMember\Controller\IndexController::class => [
'@member_css',
'@member_js',
],
],
/*
* In this configuration section, you can define which js, and css resources the module has.
*/
'modules' => [
'member' => [
# module root path for yout css and js files
'root_path' => __DIR__ . '/../assets',
# collection of assets
'collections' => [
'member_css' => [
'assets' => [
'css/member.css',
'css/ripple.css',
//'css/jquery-ui.min.css',
__DIR__ . '/../../../vendor/drmonty/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css',
__DIR__ . '/../../../vendor/drmonty/datatables-responsive/css/dataTables.responsive.css',
__DIR__ . '/../../../vendor/drmonty/datatables-responsive/css/responsive.bootstrap.css',
__DIR__ . '/../../../vendor/ivaynberg/select2/dist/css/select2.min.css',
],
'options' => [
'output' => 'head_member.css',
],
'filters' => [
'CssRewriteFilter' => [
'name' => Application\View\Assetic\Filter\FontFilter::class,
],
],
],
'member_js' => [
'assets' => [
__DIR__ . '/../../../vendor/components/mathjs/dist/math.min.js',
__DIR__ . '/../../../vendor/nnnick/chartjs/dist/Chart.min.js',
__DIR__ . '/../../../vendor/datatables/datatables/media/js/jquery.dataTables.min.js',
__DIR__ . '/../../../vendor/drmonty/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.js',
__DIR__ . '/../../../vendor/drmonty/datatables-responsive/js/dataTables.responsive.js',
__DIR__ . '/../../../vendor/drmonty/datatables-responsive/js/responsive.bootstrap.js',
__DIR__ . '/../../../vendor/ivaynberg/select2/dist/js/select2.full.min.js',
],
'options' => [
'output' => 'head_member.js',
],
],
],
],
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment